Utilizing the OpenAI API with C# for Assistants V2 and the New Vector Storage

Most resources and examples for the OpenAI API are tailored towards Python. I’m curious if anyone has experience with integrating the OpenAI API directly using C#, specifically for utilizing “Assistants V2” and uploading files to the new Vector Storage.
Could anyone share documentation or insights on this? Any guidance or pointers would be greatly appreciated.
Thanks!

1 Like

I was able to implement the Assistant V2 using Apex Programming Language. All I had to do was to convert the CURL commands to HTTP Requests in my code. You can do the same. Try this CURL to C# converter.

The only problem I faced was to implement the Streaming Feature in Apex as there’s no CURL available for that.

Thank you very much @MrFriday!
That gave me a good source for investigation.
Have a great day

1 Like

@fzadomeni, I realize this post is about a month old, but have you made progress with integrating the OpenAI API in c#. I have a functional set of C# calls to wrapper the critical API calls (file upload, vector creation, assistant creation, thread creation, add message, run, etc.). The one I am struggling with is a stream for results. Have you been able to implement this in C#? Let me know if you are interested in collaborating.

Hi Jeff,
I’ve made some decent progress. However, now I’m shifting to the new Semantic Kernel as it looks better for integrating a .Net / C# app without dealing with Python too much.

I’m definitely interested in sharing insights and frustrations.

Maybe a Teams or Whastapp call?

Cheers,

Integrated with V2 using c#. It is pretty straight forward