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

[Agent][Enhancement]Add tool choice #270

Merged
merged 15 commits into from
Jan 10, 2024
Merged

Conversation

Southpika
Copy link
Contributor

  1. 增加tool choice
  2. 增加基于 tool choice的半自动Agent,当前方案为可规定前N轮调用的工具
  3. 增加tool choice下agent的单测

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (6fbc099) 69.37% compared to head (12c3581) 69.12%.
Report is 1 commits behind head on develop.

Files Patch % Lines
...-agent/src/erniebot_agent/agents/function_agent.py 38.09% 13 Missing ⚠️
...t-agent/src/erniebot_agent/chat_models/erniebot.py 50.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #270      +/-   ##
===========================================
- Coverage    69.37%   69.12%   -0.26%     
===========================================
  Files           63       63              
  Lines         3236     3258      +22     
===========================================
+ Hits          2245     2252       +7     
- Misses         991     1006      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines 119 to 126
if first_tools:
self._first_tools = first_tools
for tool in self._first_tools:
if tool not in self.get_tools():
raise RuntimeError("The first tool must be in the tools list.")
else:
self._first_tools = []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

暂时为类的方法
即:指定之后,每一次run都需先执行first_tools

@sijunhe sijunhe merged commit 568328b into PaddlePaddle:develop Jan 10, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants