Skip to content

[Bug]: Documentation for agent groupchat contains bug when groupchat llm_config is used that have functions and tools registered to it #2147

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

Closed
ithllc opened this issue Mar 25, 2024 · 3 comments · Fixed by #2176
Labels
documentation Improvements or additions to documentation

Comments

@ithllc
Copy link

ithllc commented Mar 25, 2024

Describe the Bug

https://github.com/microsoft/autogen/issues/960#issuecomment-2017254431 from the URL provided. I mentioned that the known issue of groupchat llm_config is used in the both the documentation https://microsoft.github.io/autogen/docs/notebooks/agentchat_groupchat_RAG/#construct-agents and the sample notebook 'agent_groupchat_RAG.ipynb' and easily reproduces the error of the known issue based on the outstanding issue of issues #274, #252, #960, and #152 regarding function calling in groupchats using pyautogen==0.2.2.

As stated, this is confusing to the end user trying to use the documentation and sample notebook to learn the autogen framework.

The correct behavior should be that no error is produced when the groupchat uses the llm_config and as per @ekzhu and @afourney "Don't share llm_config among different agents. You can share the config list, but LLM configs get modified as you register functions"

My solution was to copy the llm_config and pop out the function and tools registration, which worked fine for the agent groupchat when calling the 'call_rag_chat' function, but instead, both the sample and the documentation need to show separate llm_config being used for the groupchat when functions and tools are being used.

Steps to reproduce

using autogen version 0.2.20, run the sample notebook 'agent_groupchat_RAG.ipynb' and call the function 'call_rag_chat'.

Model Used

mistral 7B instruct v2

Expected Behavior

No error message should occur, if the llm_config is passed to the groupchat, there should be check that it has functions or tools registered to it, if so, create a new instance of the llm_config without the functions and tools registered and this will automatically fix it but for demonstration purposes just add another llm_config called 'llm_config_groupchat' that is associated with the config_list, that way it doesn't have any registered functions or tools with it.

Screenshots and logs

No response

Additional Information

autogen 0.2.20
ubuntu 22.04
python 3.11.1

@ithllc ithllc added the bug label Mar 25, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Mar 26, 2024

This is related to #2139.

Would you like to help out on this issue? You can submit a PR close both issues.

@ekzhu ekzhu added the documentation Improvements or additions to documentation label Mar 26, 2024
@jtoy
Copy link
Contributor

jtoy commented Mar 27, 2024

I'm looking at this issue

@Fengbujue862
Copy link

I have corrected the error in llm_config, but there are the following errors in function retrieve content.

Trying to create collection.
not enough values to unpack (expected 2, got 1)
doc_ids: [[]]
No more context, will terminate.
Boss (to chat_manager):

Does anyone know how to solve it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants