betalgo / openai

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

Add Beta Assistant & Support Assistant Function calling #437

Closed CongquanHu closed 6 months ago

CongquanHu commented 7 months ago
  1. Added beta Assistant features (some apis)
  2. Support for Assistant function calls
  3. The added API has been tested
  4. assistants can be further completed with the remaining api functionality
belaszalontai commented 7 months ago

Great job. Wouldn't it be better if the Assistant API related classes were organized in a separate sub folders? I know it's been a mess so far, but at some point we should start tidying it up. For example in the Interfaces, Managers, RequestModels, ResponseModels, and SharedModels folders you should create an Assistant sub folder.

CongquanHu commented 7 months ago

Thanks for your reply. I saw our great openai.NET library on the openai official website. After reading the project code implementation carefully, I found that unfortunately there were no beta version Assistants in the library at the moment, which was something I needed for my latest project. Therefore, in order to use the beta Assistants function as soon as possible, I focused on the implementation of the function, and the code implementation style and specification were as consistent as possible, ignoring the need to add Assistant sub folder. What you said about adding Assistant sub folder is a good idea, but I found that some folders and their classes really confused me during the addition, especially "RequestModels, ResponseModels, and SharedModels", For example, "baseResponse.cs" I think should be added to SharedModels folder, but in ResponseModels folder, the definition of the folder and the purpose of the class seem to be inconsistent and confusing. But I think we can make a special adjustment later. Finally, thank you very much for your patient reply~

belaszalontai commented 7 months ago

Copy that. So we need a separated issue to organize directories, but in this accelerated environment I don't think that this organizing issue will be implemented ever.

kayhantolga commented 7 months ago

hi, could you update the target branch as dev branch, please?

CongquanHu commented 7 months ago

Certainly! I have already updated the target branch to the dev branch.

kayhantolga commented 7 months ago

I am planning to merge https://github.com/betalgo/openai/pull/432/ before this pull request, which will likely result in merge conflicts.

SashelI commented 7 months ago

Hi, I was wondering if this commit is planned for release anytime soon ? I would need to use assistants for a project ^^

ds5678 commented 6 months ago

If the author of this pr is unwilling to rebase or do the requested changes, I am willing to do so for them.

kayhantolga commented 6 months ago

Hi, there are several changes in this commit, which is causing an issue for code review. There is another pull request (PR) waiting with similar features. I need to decide whether to merge one of them or simply implement the same feature, which might be quicker than resolving merge conflicts and conducting a code review. Typically, smaller PRs have a higher chance of being merged. You can make the rebase changes, but I can't guarantee that I will merge the PR. However, assistant support will likely be available during the first week of January.