-
Notifications
You must be signed in to change notification settings - Fork 29
WIP tmp #409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
WIP tmp #409
Conversation
| if isinstance(last_message.content, list): | ||
| # Filter out control flow tools from content as well | ||
| filtered_ids = {tc["id"] for tc in filtered_tool_calls} | ||
| filtered_content = [ | ||
| item | ||
| for item in last_message.content | ||
| if not ( | ||
| isinstance(item, dict) | ||
| and item.get("type") == "function_call" | ||
| and item.get("call_id") not in filtered_ids | ||
| ) | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this only works for OpenAPI
| # Create temporary state with the response to filter tool calls | ||
| temp_state = AgentGraphState( | ||
| messages=[*messages, response], | ||
| inner_state=state.inner_state, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the temp state?
| from .router import filter_control_flow_tool_calls_from_state | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally not the biggest fan of scoped imports, but that's just me.
I'd also move that utility function somewhere else, since llm_node importing from router feels weird if you think about separating concerns.
No description provided.