You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the graph.stream function with the parameter stream_mode="messages", is it possible to extract metadata associated with the tools being used?. This will include details such as the tool name and other relevant attributes.
I am using the ToolNode to handle tool_llms calls.
Example Usage:
# Example of using graph.stream with stream_mode="messages"formsg, metadataingraph.stream(input, stream_mode="messages"):
# Extract tool metadatatool_name=metadata.get("tool_name", None)
iftool_name:
print(f"Tool Name: {tool_name}")
Common Use Cases:
Logging tool usage during streaming.
Debugging or monitoring which tools are being invoked.
Building analytics or reports based on tool interactions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Extract Tool Metadata in
graph.stream
When using the
graph.stream
function with the parameterstream_mode="messages"
, is it possible to extract metadata associated with the tools being used?. This will include details such as the tool name and other relevant attributes.I am using the ToolNode to handle tool_llms calls.
Example Usage:
Common Use Cases:
Beta Was this translation helpful? Give feedback.
All reactions