betalgo / openai

OpenAI .NET sdk - Azure OpenAI, ChatGPT, Whisper, and DALL-E
https://betalgo.github.io/openai/
MIT License
2.84k stars 513 forks source link

Support for Selecting Pre-existing Assistants in Betalgo OpenAI C# Library #599

Closed mikepowertech79 closed 1 week ago

mikepowertech79 commented 2 weeks ago

Is your feature request related to a problem? Please describe. Yes, I'm encountering a limitation in the Betalgo OpenAI C# library when integrating ChatGPT assistants. Currently, the library does not offer an option to select and utilize a pre-existing assistant created via the OpenAI platform (e.g., through the assistant management interface). This restricts the ability to manage and interact with assistants that are already configured and fine-tuned in the OpenAI environment, leading to redundancy and increased overhead in assistant management. https://platform.openai.com/docs/api-reference/assistants/getAssistant

Describe the solution you'd like I would like the library to include functionality that allows users to specify an existing assistant's ID when creating chat sessions. This feature would enable developers to seamlessly integrate and manage multiple pre-configured assistants directly through the C# library, enhancing usability and flexibility in application development.

Describe alternatives you've considered As a workaround, I have considered manually mapping assistant IDs within my application logic and passing these IDs as parameters when initiating sessions. However, this approach is less efficient and does not leverage the native capabilities of the OpenAI API, which could potentially offer more robust and integrated solutions.

Additional context I've attached screenshots demonstrating the absence of this feature in the current library interface. The ability to directly select a pre-existing assistant would significantly streamline the development process for applications leveraging the OpenAI platform. Also, here is a additional video about the issue: https://youtu.be/LQ5xtsp7gYo?t=464 AssistantIssue

kayhantolga commented 2 weeks ago

Can you share what kind of code you wish existed? Because we have methods to list and also retrieve an assistant linked to your account. You should be able to use the Assistant that you created via the API or Playground UI.