Skip to content

Commit

Permalink
fix import in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincburns committed Jan 29, 2025
1 parent a40e796 commit 9868059
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/how-tos/cross-thread-persistence-functional.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,9 @@
" entrypoint,\n",
" task,\n",
" MemorySaver,\n",
" addMessages,\n",
" type BaseStore,\n",
" getStore,\n",
"} from \"@langchain/langgraph\";\n",
"import type { BaseMessage, BaseMessageLike } from \"@langchain/core/messages\";\n",
"import type { BaseMessage } from \"@langchain/core/messages\";\n",
"\n",
"const model = new ChatAnthropic({\n",
" model: \"claude-3-5-sonnet-latest\",\n",
Expand Down Expand Up @@ -197,14 +195,14 @@
" store: inMemoryStore,\n",
" name: \"workflow\",\n",
"}, async (params: {\n",
" messages: BaseMessageLike[];\n",
" messages: BaseMessage[];\n",
" userId: string;\n",
"}, config) => {\n",
" const messages = addMessages([], params.messages)\n",
" const messages = [...params.messages];\n",
" const response = await callModel(messages, config.store, params.userId);\n",
" return entrypoint.final({\n",
" value: response,\n",
" save: addMessages(messages, response),\n",
" save: [...messages, response],\n",
" });\n",
"});"
]
Expand Down

0 comments on commit 9868059

Please sign in to comment.