MixedChat_Agents - recreating conversation #8657
-
Hi Team, looking at https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/Agents/MixedChat_Agents.cs In a classic web scenario, when a user asks something, we post the question to the server, return the answer to the user, and the user asks again - we need to recreate AgentGroupChat on each post. How should we store the chat conversation between server runs and re-create history? If one of the agents is an OpenAI assistant, is every (post to the server) run on a different OPENAI thread? Does the SK create a new thread and somehow fills the assistant's part of the chat history? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We are currently working on a feature to serialize and deserialize If you are using one agent type (only
When If you must absolutely become unblocked immediately, you might consider retrieving the |
Beta Was this translation helpful? Give feedback.
We are currently working on a feature to serialize and deserialize
AgentChat
(whichAgentGroupChat
will fully support). If your scenario is bound to a mixed agent scenario, then this feature is likely required. We hope to have this available within the next few weeks.If you are using one agent type (only
ChatCompletionAgent
orOpenAIAssistantAgent
), then you could preserve either theChatHistory
or ThreadId in storage for retreival. If your service has the concept of a user-session, then you'd retrieve the appropriate state according to that session-key (which is likely component of the URI in your REST API).