Skip to content

Commit f69f959

Browse files
authored
chore: update references to use the latest version of Claude-3.5 Sonnet (#32594)
1 parent 8d0fb2d commit f69f959

File tree

11 files changed

+34
-34
lines changed

11 files changed

+34
-34
lines changed

docs/docs/how_to/chat_models_universal_init.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
},
160160
{
161161
"cell_type": "code",
162-
"execution_count": 8,
162+
"execution_count": null,
163163
"id": "321e3036-abd2-4e1f-bcc6-606efd036954",
164164
"metadata": {
165165
"execution": {
@@ -183,7 +183,7 @@
183183
],
184184
"source": [
185185
"configurable_model.invoke(\n",
186-
" \"what's your name\", config={\"configurable\": {\"model\": \"claude-3-5-sonnet-20240620\"}}\n",
186+
" \"what's your name\", config={\"configurable\": {\"model\": \"claude-3-5-sonnet-latest\"}}\n",
187187
")"
188188
]
189189
},
@@ -234,7 +234,7 @@
234234
},
235235
{
236236
"cell_type": "code",
237-
"execution_count": 7,
237+
"execution_count": null,
238238
"id": "6c8755ba-c001-4f5a-a497-be3f1db83244",
239239
"metadata": {
240240
"execution": {
@@ -261,7 +261,7 @@
261261
" \"what's your name\",\n",
262262
" config={\n",
263263
" \"configurable\": {\n",
264-
" \"first_model\": \"claude-3-5-sonnet-20240620\",\n",
264+
" \"first_model\": \"claude-3-5-sonnet-latest\",\n",
265265
" \"first_temperature\": 0.5,\n",
266266
" \"first_max_tokens\": 100,\n",
267267
" }\n",
@@ -336,7 +336,7 @@
336336
},
337337
{
338338
"cell_type": "code",
339-
"execution_count": 9,
339+
"execution_count": null,
340340
"id": "e57dfe9f-cd24-4e37-9ce9-ccf8daf78f89",
341341
"metadata": {
342342
"execution": {
@@ -368,14 +368,14 @@
368368
"source": [
369369
"llm_with_tools.invoke(\n",
370370
" \"what's bigger in 2024 LA or NYC\",\n",
371-
" config={\"configurable\": {\"model\": \"claude-3-5-sonnet-20240620\"}},\n",
371+
" config={\"configurable\": {\"model\": \"claude-3-5-sonnet-latest\"}},\n",
372372
").tool_calls"
373373
]
374374
}
375375
],
376376
"metadata": {
377377
"kernelspec": {
378-
"display_name": "langchain",
378+
"display_name": "langchain-monorepo",
379379
"language": "python",
380380
"name": "python3"
381381
},
@@ -389,7 +389,7 @@
389389
"name": "python",
390390
"nbconvert_exporter": "python",
391391
"pygments_lexer": "ipython3",
392-
"version": "3.10.16"
392+
"version": "3.12.11"
393393
}
394394
},
395395
"nbformat": 4,

docs/docs/how_to/tool_artifacts.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
},
148148
{
149149
"cell_type": "code",
150-
"execution_count": 5,
150+
"execution_count": null,
151151
"id": "74de0286-b003-4b48-9cdd-ecab435515ca",
152152
"metadata": {},
153153
"outputs": [],
@@ -157,7 +157,7 @@
157157
"\n",
158158
"from langchain_anthropic import ChatAnthropic\n",
159159
"\n",
160-
"llm = ChatAnthropic(model=\"claude-3-5-sonnet-20240620\", temperature=0)"
160+
"llm = ChatAnthropic(model=\"claude-3-5-sonnet-latest\", temperature=0)"
161161
]
162162
},
163163
{

docs/docs/how_to/tool_stream_events.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"cell_type": "code",
41-
"execution_count": 1,
41+
"execution_count": null,
4242
"metadata": {},
4343
"outputs": [],
4444
"source": [
@@ -53,7 +53,7 @@
5353
"if \"ANTHROPIC_API_KEY\" not in os.environ:\n",
5454
" os.environ[\"ANTHROPIC_API_KEY\"] = getpass()\n",
5555
"\n",
56-
"model = ChatAnthropic(model=\"claude-3-5-sonnet-20240620\", temperature=0)"
56+
"model = ChatAnthropic(model=\"claude-3-5-sonnet-latest\", temperature=0)"
5757
]
5858
},
5959
{

docs/docs/integrations/chat/anthropic.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@
124124
},
125125
{
126126
"cell_type": "code",
127-
"execution_count": 4,
127+
"execution_count": null,
128128
"id": "cb09c344-1836-4e0c-acf8-11d13ac1dbae",
129129
"metadata": {},
130130
"outputs": [],
131131
"source": [
132132
"from langchain_anthropic import ChatAnthropic\n",
133133
"\n",
134134
"llm = ChatAnthropic(\n",
135-
" model=\"claude-3-5-sonnet-20240620\",\n",
135+
" model=\"claude-3-5-sonnet-latest\",\n",
136136
" temperature=0,\n",
137137
" max_tokens=1024,\n",
138138
" timeout=None,\n",

docs/docs/integrations/chat/bedrock.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@
129129
},
130130
{
131131
"cell_type": "code",
132-
"execution_count": 1,
132+
"execution_count": null,
133133
"id": "cb09c344-1836-4e0c-acf8-11d13ac1dbae",
134134
"metadata": {},
135135
"outputs": [],
136136
"source": [
137137
"from langchain_aws import ChatBedrockConverse\n",
138138
"\n",
139139
"llm = ChatBedrockConverse(\n",
140-
" model_id=\"anthropic.claude-3-5-sonnet-20240620-v1:0\",\n",
140+
" model_id=\"anthropic.claude-3-5-sonnet-latest-v1:0\",\n",
141141
" # region_name=...,\n",
142142
" # aws_access_key_id=...,\n",
143143
" # aws_secret_access_key=...,\n",

docs/docs/integrations/tools/stripe.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"from langgraph.prebuilt import create_react_agent\n",
154154
"\n",
155155
"llm = ChatAnthropic(\n",
156-
" model=\"claude-3-5-sonnet-20240620\",\n",
156+
" model=\"claude-3-5-sonnet-latest\",\n",
157157
")\n",
158158
"\n",
159159
"langgraph_agent_executor = create_react_agent(llm, stripe_agent_toolkit.get_tools())\n",

docs/docs/troubleshooting/errors/MESSAGE_COERCION_FAILURE.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
},
4646
{
4747
"cell_type": "code",
48-
"execution_count": 5,
48+
"execution_count": null,
4949
"metadata": {},
5050
"outputs": [
5151
{
@@ -74,7 +74,7 @@
7474
"\n",
7575
"uncoercible_message = {\"role\": \"HumanMessage\", \"random_field\": \"random value\"}\n",
7676
"\n",
77-
"model = ChatAnthropic(model=\"claude-3-5-sonnet-20240620\")\n",
77+
"model = ChatAnthropic(model=\"claude-3-5-sonnet-latest\")\n",
7878
"\n",
7979
"model.invoke([uncoercible_message])"
8080
]

docs/docs/tutorials/summarization.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
"We can use [create_stuff_documents_chain](https://python.langchain.com/api_reference/langchain/chains/langchain.chains.combine_documents.stuff.create_stuff_documents_chain.html), especially if using larger context window models such as:\n",
237237
"\n",
238238
"* 128k token OpenAI `gpt-4o` \n",
239-
"* 200k token Anthropic `claude-3-5-sonnet-20240620`\n",
239+
"* 200k token Anthropic `claude-3-5-sonnet-latest`\n",
240240
"\n",
241241
"The chain will take a list of documents, insert them all into a prompt, and pass that prompt to an LLM:"
242242
]

libs/langchain/langchain/chat_models/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def init_chat_model(
230230
"what's your name",
231231
config={
232232
"configurable": {
233-
"foo_model": "anthropic:claude-3-5-sonnet-20240620",
233+
"foo_model": "anthropic:claude-3-5-sonnet-latest",
234234
"foo_temperature": 0.6
235235
}
236236
}
@@ -272,7 +272,7 @@ class GetPopulation(BaseModel):
272272
273273
configurable_model_with_tools.invoke(
274274
"Which city is hotter today and which is bigger: LA or NY?",
275-
config={"configurable": {"model": "claude-3-5-sonnet-20240620"}}
275+
config={"configurable": {"model": "claude-3-5-sonnet-latest"}}
276276
)
277277
# Claude-3.5 sonnet response with tools
278278

libs/langchain_v1/langchain/chat_models/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def init_chat_model(
224224
"what's your name",
225225
config={
226226
"configurable": {
227-
"foo_model": "anthropic:claude-3-5-sonnet-20240620",
227+
"foo_model": "anthropic:claude-3-5-sonnet-latest",
228228
"foo_temperature": 0.6
229229
}
230230
}
@@ -266,7 +266,7 @@ class GetPopulation(BaseModel):
266266
267267
configurable_model_with_tools.invoke(
268268
"Which city is hotter today and which is bigger: LA or NY?",
269-
config={"configurable": {"model": "claude-3-5-sonnet-20240620"}}
269+
config={"configurable": {"model": "claude-3-5-sonnet-latest"}}
270270
)
271271
# Claude-3.5 sonnet response with tools
272272

0 commit comments

Comments
 (0)