mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
dont forward conversationId to ichatclient (#2632)
This commit is contained in:
@@ -36,7 +36,13 @@ internal sealed class AIAgentResponseExecutor : IResponseExecutor
|
||||
// Create options with properties from the request
|
||||
var chatOptions = new ChatOptions
|
||||
{
|
||||
ConversationId = request.Conversation?.Id,
|
||||
// Note: We intentionally do NOT set ConversationId on ChatOptions here.
|
||||
// The conversation ID from the client request is used by the hosting layer
|
||||
// to manage conversation storage, but should not be forwarded to the underlying
|
||||
// IChatClient as it has its own concept of conversations (or none at all).
|
||||
// ---
|
||||
// ConversationId = request.Conversation?.Id,
|
||||
|
||||
Temperature = (float?)request.Temperature,
|
||||
TopP = (float?)request.TopP,
|
||||
MaxOutputTokens = request.MaxOutputTokens,
|
||||
|
||||
+8
-1
@@ -82,9 +82,16 @@ internal sealed class HostedAgentResponseExecutor : IResponseExecutor
|
||||
{
|
||||
string agentName = GetAgentName(request)!;
|
||||
AIAgent agent = this._serviceProvider.GetRequiredKeyedService<AIAgent>(agentName);
|
||||
|
||||
var chatOptions = new ChatOptions
|
||||
{
|
||||
ConversationId = request.Conversation?.Id,
|
||||
// Note: We intentionally do NOT set ConversationId on ChatOptions here.
|
||||
// The conversation ID from the client request is used by the hosting layer
|
||||
// to manage conversation storage, but should not be forwarded to the underlying
|
||||
// IChatClient as it has its own concept of conversations (or none at all).
|
||||
// ---
|
||||
// ConversationId = request.Conversation?.Id,
|
||||
|
||||
Temperature = (float?)request.Temperature,
|
||||
TopP = (float?)request.TopP,
|
||||
MaxOutputTokens = request.MaxOutputTokens,
|
||||
|
||||
Reference in New Issue
Block a user