Skip to content

Commit 4e65ea7

Browse files
committed
Json schema fix
1 parent abe1441 commit 4e65ea7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openai-examples/src/main/scala/io/cequence/openaiscala/examples/anthropic/tools/AnthropicCreateMessageWithTools.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ object AnthropicCreateMessageWithTools extends ExampleBase[AnthropicService] {
2020
// Example 1: Custom tool (get_weather)
2121
private val weatherTool = Tool.custom(
2222
name = "get_weather",
23-
inputSchema = JsonSchema.Object(
23+
inputSchema = JsonSchema.ObjectAsMap(
2424
properties = Map(
2525
"location" -> JsonSchema.String(
2626
description = Some("The city and state, e.g. San Francisco, CA")

openai-examples/src/main/scala/io/cequence/openaiscala/examples/responsesapi/CreateModelResponseWithFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ object CreateModelResponseWithFunctions extends Example {
1818
tools = Seq(
1919
Tool.function(
2020
name = "get_current_weather",
21-
parameters = JsonSchema.Object(
21+
parameters = JsonSchema.ObjectAsMap(
2222
properties = Map(
2323
"location" -> JsonSchema.String(
2424
description = Some("The city and state, e.g. San Francisco, CA")

0 commit comments

Comments
 (0)