Skip to content
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

refactor: update inputs in ToolCallingAgentComponent and add astream_events setup #4240

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

edwinjosechittilappilly
Copy link
Collaborator

@edwinjosechittilappilly edwinjosechittilappilly commented Oct 22, 2024

This pull request introduces several enhancements and refactorings to improve agent processing and streamline the codebase. The most significant changes include adding a new method for processing agent events, updating type imports, and modifying input handling in the ToolCallingAgentComponent.

Enhancements to agent processing:

Codebase simplification:

Input handling improvements:

@edwinjosechittilappilly
Copy link
Collaborator Author

We need to wait for the merging of pull request PR #4166, as the tool calling agent component currently produces an error until that is completed. Once PR #4166 is merged, it will resolve the issue, allowing us to proceed with merging this pull request and implementing further improvements to the tool-calling agents.

Plan of Action:
Add support for Llama 3.x tool calling.

- Introduced `process_agent_events` method to handle asynchronous event processing for agent execution.
- Added individual async handlers for different event types: `handle_chain_start`, `handle_chain_end`, `handle_chat_model_stream`, `handle_tool_start`, and `handle_tool_end`.
- Updated agent execution to use `astream_events` for improved event handling.
- Enhanced logging for better traceability of agent and tool execution events.
@ogabrielluiz ogabrielluiz changed the title Refactor ToolCallingAgentComponent to enhance input handling refactor: update inputs in ToolCallingAgentComponent and add astream_events setup Oct 25, 2024
@github-actions github-actions bot added the refactor Maintenance tasks and housekeeping label Oct 25, 2024
@ogabrielluiz ogabrielluiz marked this pull request as ready for review October 25, 2024 20:36
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Maintenance tasks and housekeeping size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants