Uh oh!
There was an error while loading. Please reload this page.
Bring back AsIChatClient for OpenAI AssistantClient - #6501
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
asinghca
commented
Jul 9, 2025
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. |
stephentoub
commented
Jul 15, 2025
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