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

[Core] [Tool Call] adjust conversable agent to support tool_calls #974

Merged
merged 69 commits into from
Jan 6, 2024

Conversation

yenif
Copy link
Collaborator

@yenif yenif commented Dec 13, 2023

Why are these changes needed?

Add tool support to conversable agent, updates required to work with #791

Related issue number

Checks

@yenif
Copy link
Collaborator Author

yenif commented Dec 13, 2023

@microsoft-github-policy-service agree

@yenif
Copy link
Collaborator Author

yenif commented Dec 13, 2023

openai api has been giving me 500s all day so had some time to clean up the fixes I needed to get tools working

@ekzhu
Copy link
Collaborator

ekzhu commented Jan 6, 2024

@sonichi notebook tests that was failing previously passed for me locally now. Some notebook tests fail but the reason doesn't seem to related to this change. This notebook (https://github.com/microsoft/autogen/blob/main/notebook/agentchat_hierarchy_flow_using_select_speaker.ipynb) failed for the selected speak was None.

Can you run the OpenAI tests again. If that notebook fails then it's not related.

@sonichi sonichi added this pull request to the merge queue Jan 6, 2024
Merged via the queue into microsoft:main with commit 40dbf31 Jan 6, 2024
80 of 84 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…crosoft#974)

* adjust conversable and compressible agents to support tool_calls

* split out tools into their own reply def

* copilot typo

* address review comments

* revert compressible_agent and token_count_utils calls

* cleanup terminate check and remove unnecessary code

* doc search and update

* return function/tool calls as interrupted when user provides a reply to a tool call request

* fix tool name reference

* fix formatting

* fix initiate receiving a dict

* missed changed roled

* ignore incoming role, more similiar to existing code

* consistency

* redundant to_dict

* fix todo comment

* uneeded change

* handle dict reply in groupchat

* Fix generate_tool_call_calls_reply_comment

* change method annotation for register_for_llm from functions to tools

* typo autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <[email protected]>

* add deprecation comments for function_call

* tweak doc strings

* switch to ToolFunction type

* update the return to

* fix generate_init_message return type

* Revert "fix generate_init_message return type"

This reverts commit 645ba8b.

* undo force init to dict

* fix notebooks and groupchat tool handling

* fix type

* use get for key error

* fix teachable to pull content from dict

* change single message tool response

* cleanup unnessary changes

* little better tool response concatenation

* update tools tests

* add skip openai check to tools tests

* fix nits

* move func name normalization to oai_reply and assert configured names

* fix whitespace

* remove extra normalize

* tool name is now normalized in the generate_reply function, so will not be incorrect when sent to receive

* validate function names in init and expand comments for validation methods

* fix dict comprehension

* Dummy llm config for unit tests

* handle tool_calls set to None

* fix tool name reference

* method operates on responses not calls

---------

Co-authored-by: Yiran Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
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.

8 participants