Description
Describe the bug
Not able to fetch messages for an AzureAIAgentThread
with a thread where the agent no longer exists. Reason for this is that each message inside a thread seems to have the field agent_id
associated to it. This in itself causes the issue when calling get_messages
on a thread since the message object has an id of an agent which no longer exists causing this method to fail. The reason why this should not fail is because if a thread exists we should still be able to fetch the messages in order to either continue the conversation with an other agent (doable in the playground) or to just retrieve the messages in the thread for any arbitrary reason when the original assistant to those messages no longer exists.
To Reproduce
Steps to reproduce the behavior:
- Create
AzureAIAgent
- Create
AzureAIAgentThread
- Save the thread id
- Invoke chat with agent
- Delete agent
- Create
AzureAIAgentThread
with the original thread id saved from step (3) - Try to retrieve the messages for the thread
Expected behavior
Messages from that thread to be returned even if assistant_id
for those messages are no longer present. If thread id itself is non-existent then it should return error.
Platform
- Language: Python
- AI model: OpenAI:GPT-4o-mini(2024-07-18)
- IDE: Visual Studio, VS Code
- OS: Mac
Metadata
Metadata
Assignees
Type
Projects
Status