So I’m seeing an issue where the assistant just doesn’t respond. I’m using #autogen here and this is the traceback:
Traceback (most recent call last):
File "E:\Documents\repos\nbaGPT\src\main.py", line 93, in <module>
user_proxy.initiate_chat(
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\conversable_agent.py", line 672, in initiate_chat
self.send(self.generate_init_message(**context), recipient, silent=silent)
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\conversable_agent.py", line 420, in send
recipient.receive(message, self, request_reply, silent)
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\conversable_agent.py", line 578, in receive
reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\conversable_agent.py", line 1241, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\groupchat.py", line 375, in run_chat
reply = speaker.generate_reply(sender=self)
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\conversable_agent.py", line 1241, in generate_reply
final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
File "E:\Documents\repos\nbaGPT\venv\lib\site-packages\autogen\agentchat\contrib\gpt_assistant_agent.py", line 167, in _invoke_assistant
assert len(run_response_messages) > 0, "No response from the assistant."
AssertionError: No response from the assistant.
At first I thought it was a timeout issue and autogen was just moving forward before the assistant had completed it’s run but that’s not the case. I have 3 assistants with autogen and 2 of them are working but one (nba_analyst
) isn’t so I went in the playground and just gave it a message and the same thing happened in the playground. The run is indeed completing in “completed” status but no new message is added to the thread:
The returned run object:
{
"object": "list",
"data": [
{
"id": "run_SNlbaV8CZrqBpGe4mT474nx8",
"object": "thread.run",
"created_at": 1706040009,
"assistant_id": "asst_FrIJVmoyyY1SPMxe5bpoEi3V",
"thread_id": "thread_BJDUoCRPAYZ6zndIHDqE3cyR",
"status": "completed",
"started_at": 1706040009,
"expires_at": null,
"cancelled_at": null,
"failed_at": null,
"completed_at": 1706040059,
"last_error": null,
"model": "gpt-4-1106-preview",
"instructions": <removed for brevity and security>,
"tools": [],
"file_ids": [],
"metadata": {},
"usage": {
"prompt_tokens": 19335,
"completion_tokens": 180,
"total_tokens": 19515
}
}
],
"first_id": "run_SNlbaV8CZrqBpGe4mT474nx8",
"last_id": "run_SNlbaV8CZrqBpGe4mT474nx8",
"has_more": false
}
List of the thread messages AFTER the completed run (nothing has been removed by me):
{
"object": "list",
"data": [
{
"id": "msg_mnDPoDE2lRUdjifLROCPbgz2",
"object": "thread.message",
"created_at": 1706040009,
"thread_id": "thread_BJDUoCRPAYZ6zndIHDqE3cyR",
"role": "user",
"content": [
{
"type": "text",
"text": {
"value": "What's the best GSW lineup that includes Kuminga?",
"annotations": []
}
}
],
"file_ids": [],
"assistant_id": null,
"run_id": null,
"metadata": {}
}
],
"first_id": "msg_mnDPoDE2lRUdjifLROCPbgz2",
"last_id": "msg_mnDPoDE2lRUdjifLROCPbgz2",
"has_more": false
}
Notice that there is only the original user message and no message from the assistant. Also notice in the run that completion_tokens
is at 180 indicating that there was a response but it was never added to the thread’s messages.