You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using society_of_mind_agent in a group chat with a user_proxy_agent as executor and assistant to suggest function, the code fails with the following error message:
{
"Error code": 400,
"error": {
"message": "Additional properties are not allowed ('tool_responses' was unexpected) - 'messages.3'",
"type": "invalid_request_error",
"param": None,"code": None
}
}
Attempted Solution
removing "tool_response" from params in create function in OpenAIClient.py
{
"Error code": 400,
"error": {
"message": "Invalid parameter: only messages with role 'assistant' can have a function call.",
"type": "invalid_request_error",
"param": "messages.[2].function_call",
"code": None
}
}
@code_interpreter.register_for_execution()@assistant.register_for_llm(name="assitant_llm",description="Assistant LLM to return stock prices",)defget_stock_price(query: str) ->str:
return"""Dates in 2024 when the Microsoft stock price was higher than $370. Here are the first few dates when the Microsoft stock price was higher than $370 in 2024:- 2024-01-02- 2024-01-03- 2024-01-08- 2024-01-09- 2024-01-10Please note that the output may contain more dates, but only the first few are shown here.In 2024, Microsoft stock was higher than $370 on multiple days. The exact dates can be obtained by analyzing historical stock data."""
Expected Behavior
return the final summary from group chat manager without errir
I'm seeing the same error, with a similar setup. Thanks for posting the issue, I was about to do it. Once this is solved, this new "Society of Mind agent" will be a very elegant solution to summarizing RAG results.
Describe the bug
Issue Description
When using
society_of_mind_agent
in a group chat with auser_proxy_agent
as executor andassistant
to suggest function, the code fails with the following error message:Attempted Solution
removing "tool_response" from
params
increate
function inOpenAIClient.py
Steps to reproduce
add function call to the example shared at https://github.com/microsoft/autogen/blob/main/notebook/agentchat_society_of_mind.ipynb
e.g.
Expected Behavior
return the final summary from group chat manager without errir
Screenshots and logs
No response
Additional Information
python version: 3.11.7
pyautogen==0.2.10
OS:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
The text was updated successfully, but these errors were encountered: