-
Notifications
You must be signed in to change notification settings - Fork 817
.NET: Fix: OpenAI ChatClients do not send entity_id in AgentChatWebEx… #2378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,14 @@ public async override IAsyncEnumerable<AgentRunResponseUpdate> RunStreamingAsync | |
| var openAiClient = new OpenAIResponseClient(model: agentName, credential: new ApiKeyCredential("dummy-key"), options: options).AsIChatClient(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also has a problem, because you will have to pass a LLM model in the model name and not the agent name. This is quite strange that you will have to pass the model and the agent whereas the agent also defines which model to use. |
||
| var chatOptions = new ChatOptions() | ||
|
||
| { | ||
| ConversationId = threadId | ||
| ConversationId = threadId, | ||
| RawRepresentationFactory = _ => new ResponseCreationOptions() | ||
| { | ||
| Metadata = | ||
| { | ||
| { "entity_id", agentName } | ||
| } | ||
| }, | ||
| }; | ||
|
|
||
| await foreach (var update in openAiClient.GetStreamingResponseAsync(messages, chatOptions, cancellationToken: cancellationToken)) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the C# Sample Code Guidelines, prefer defining variables using explicit types rather than
varto help users understand the types involved. Changevar chatOptionstoChatOptions chatOptions.