-
Notifications
You must be signed in to change notification settings - Fork 828
Bring back AsIChatClient for OpenAI AssistantClient #6501
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
Conversation
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIAssistantChatClient.cs
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIAssistantChatClient.cs
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Integration.Tests/ChatClientIntegrationTests.cs
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIClientExtensions.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIClientExtensions.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.OpenAI/OpenAIResponseChatClient.cs
Show resolved
Hide resolved
.../Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIAssistantChatClientIntegrationTests.cs
Outdated
Show resolved
Hide resolved
.../Libraries/Microsoft.Extensions.AI.OpenAI.Tests/OpenAIAssistantChatClientIntegrationTests.cs
Outdated
Show resolved
Hide resolved
1d66cc8
to
34a200b
Compare
34a200b
to
4326eb0
Compare
I just wanted to thank you all so much for this update! I have recently discovered the two AI packages : https://github.com/openai/openai-dotnet/blob/main/src/Custom/Assistants/AssistantClient.cs Leveraging your updated chat client for assistant and the Open AI's assistant API client, I was able to replace a whole bunch of code with just this wrapper to meet my app level interface ILargeLanguageModelService. Prior to this, I had written my own implementation for all of it. I am curious to know if I am using, the OpenAIAssistantChatClient : IChatClient correctly? I would appreciate any feedback as I have not able to find much documentation on this particular chat client other than the source code for it.
|
You're welcome :)
It should be usable like any other IChatClient. The main thing to ensure, which it looks like you are, is that you're providing the thread ID as the ConversationId, as outlined in https://learn.microsoft.com/en-us/dotnet/ai/microsoft-extensions-ai#stateless-vs-stateful-clients. |
cc: @markwallace-microsoft
Microsoft Reviewers: Open in CodeFlow