fixed anthropic support. Anthropic has different format of response when it has tool calls. Explicit handling added
This commit is contained in:
@@ -76,9 +76,14 @@ Volume-Based Indicators:
|
||||
|
||||
result = chain.invoke(state["messages"])
|
||||
|
||||
report = ""
|
||||
|
||||
if len(result.tool_calls) == 0:
|
||||
report = result.content
|
||||
|
||||
return {
|
||||
"messages": [result],
|
||||
"market_report": result.content,
|
||||
"market_report": report,
|
||||
}
|
||||
|
||||
return market_analyst_node
|
||||
|
||||
Reference in New Issue
Block a user