Skip to content

Commit 6fa6d77

Browse files
committed
Examples with the newest Claude and Gemini models
1 parent 182fcf1 commit 6fa6d77

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object AnthropicCreateChatCompletionCachedWithOpenAIAdapter
2525
.createChatCompletion(
2626
messages = messages,
2727
settings = CreateChatCompletionSettings(
28-
NonOpenAIModelId.claude_3_5_sonnet_20241022
28+
NonOpenAIModelId.claude_3_7_sonnet_20250219
2929
// this is how we pass it through the adapter
3030
).setUseAnthropicSystemMessagesCache(true)
3131
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object AnthropicCreateMessage extends ExampleBase[AnthropicService] {
2525
.createMessage(
2626
messages,
2727
settings = AnthropicCreateMessageSettings(
28-
model = NonOpenAIModelId.claude_3_5_haiku_20241022,
28+
model = NonOpenAIModelId.claude_opus_4_20250514,
2929
max_tokens = 4096
3030
)
3131
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object AnthropicCreateMessageWithThinking extends ExampleBase[AnthropicService]
2727
.createMessage(
2828
messages,
2929
settings = AnthropicCreateMessageSettings(
30-
model = NonOpenAIModelId.claude_3_7_sonnet_20250219,
30+
model = NonOpenAIModelId.claude_sonnet_4_20250514,
3131
max_tokens = 10000,
3232
thinking = Some(ThinkingSettings(budget_tokens = 2000))
3333
)

openai-examples/src/main/scala/io/cequence/openaiscala/examples/googlegemini/GoogleGeminiGenerateContent.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ object GoogleGeminiGenerateContent extends ExampleBase[GeminiService] {
2929
.generateContent(
3030
contents,
3131
settings = GenerateContentSettings(
32-
model = NonOpenAIModelId.gemini_2_5_pro_exp_03_25,
32+
model = NonOpenAIModelId.gemini_2_5_pro_preview_05_06,
3333
systemInstruction = Some(systemPrompt),
3434
generationConfig = Some(
3535
GenerationConfig(

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object CreateModelResponseWithWebSearch extends Example {
1515
.createModelResponse(
1616
Inputs.Text("What was a positive news story from today?"),
1717
settings = CreateModelResponseSettings(
18-
model = ModelId.gpt_4o_2024_08_06,
18+
model = ModelId.gpt_4_1,
1919
tools = Seq(WebSearchTool())
2020
)
2121
)

0 commit comments

Comments
 (0)