Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,10 @@ class State(TypedDict):
|
|
26 |
def assistant(state:MessagesState):
|
27 |
system_message = SystemMessage(content="You are a helpful assistant. Your job is to answer the questions asked of you as accurately as possible. You have access to search and browser tools, which you may use when needed to answer a question.")
|
28 |
print(state["messages"])
|
|
|
|
|
29 |
return {
|
30 |
-
"messages":
|
31 |
}
|
32 |
|
33 |
workflow = StateGraph(state_schema=MessagesState)
|
|
|
26 |
def assistant(state:MessagesState):
|
27 |
system_message = SystemMessage(content="You are a helpful assistant. Your job is to answer the questions asked of you as accurately as possible. You have access to search and browser tools, which you may use when needed to answer a question.")
|
28 |
print(state["messages"])
|
29 |
+
response = llm_with_tools.invoke([system_message] + state["messages"])
|
30 |
+
print(response)
|
31 |
return {
|
32 |
+
"messages": response
|
33 |
}
|
34 |
|
35 |
workflow = StateGraph(state_schema=MessagesState)
|