Replies: 2 comments
-
|
@westey-m @rogerbarreto @SergeyMenshykh can one of you take a look here! |
Beta Was this translation helpful? Give feedback.
-
When an AgentThread is serialized for storage, the state of the ChatMessageStore is also serialized with it. In the case of CosmosChatMessageStore the state contains various ids/settings associated with that store instance. See Taking the JsonSerializerOptions parameter provides support for NativeAOT by allowing source generated serialization configuration.
Since the CosmosDB SDK doesn't support native AOT, there is no value in supporting it on CosmosChatMessageStore either.
Not exactly. They are typically mutually exclusive. ChatResponse.ConverationId is returned if the service requires/supports storing chat history in the AI service. It returns null if not. If the AI service does not support storing chat history in the service, an Agent will use a ChatMessageStore. Either the default InMemoryChatMessageStore (in which case there is no conversation id) or a custom one provided via a factory, and then it is up to that implementation to decide what id(s) it would use to store the chat history under.
What is preventing you from for example reading the user token from the HttpContext in the factory, assuming you are using asp.net?
Can you explain more about your scenario? E.g. is this for filtering or categorization in the DB, or do you want to use this data again with the agent in some way? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm kind of confused about ChatMessageStore
userIdwhich sounds great to prevent another user to hijack a conversation but when can it be passed? The ChatClientAgentOptions.ChatMessageStoreFactory doesn't give the opportunity to grab the current user of the request.Beta Was this translation helpful? Give feedback.
All reactions