-
I have a simple example that combines the basic memory and tools demo. The agent is able to answer one set of tool calls (can use one or more tool successfully), but then will immediately throw an error when it gets the next query from the user (whether or not that query would call for tools). Example Convo with Error
Code - requires an openai api
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
resolved: def call_model(state: State):
|
Beta Was this translation helpful? Give feedback.
resolved:
def call_model(state: State):
system_message = "You help users with simple integer math problems. Please use your tools."
summary = state.get("summary", "")
if summary:
system_message += f"\n\nSummary of conversation earlier: {summary}"