Sync readmes

This commit is contained in:
jacoblee93
2024-07-11 15:16:58 -07:00
parent 634fd082c5
commit b67c3d1edd
2 changed files with 1 additions and 5 deletions
-2
View File
@@ -57,8 +57,6 @@ export LANGSMITH_API_KEY=lsv2_sk_...
```
```python
from typing import Annotated, Literal, TypedDict
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
+1 -3
View File
@@ -57,8 +57,6 @@ export LANGSMITH_API_KEY=lsv2_sk_...
```
```python
from typing import Annotated, Literal, TypedDict
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
@@ -84,7 +82,7 @@ tool_node = ToolNode(tools)
model = ChatAnthropic(model="claude-3-5-sonnet-20240620", temperature=0).bind_tools(tools)
# Define the function that determines whether to continue or not
def should_continue(state: MessagesState) -> Literal["tools", END]:
def should_continue(state: MessagesState):
messages = state['messages']
last_message = messages[-1]
# If the LLM makes a tool call, then we route to the "tools" node