Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Add support for assistants #390

Closed
robinwithes opened this issue Nov 7, 2023 · 42 comments
Closed

Add support for assistants #390

robinwithes opened this issue Nov 7, 2023 · 42 comments

Comments

@robinwithes
Copy link

https://platform.openai.com/assistants

@propertius
Copy link

Interest here as well :)

@bjorkman
Copy link
Contributor

bjorkman commented Nov 9, 2023

Me too!

@remyohajinwa
Copy link
Contributor

Working on this now

@mrlobotomy
Copy link

I'm working on it too ;)

@remyohajinwa
Copy link
Contributor

@mrlobotomy I already started working on this. Can you pick another issue please ?

@remyohajinwa
Copy link
Contributor

Just so we don't spend a lot of time doing the same work

@mrlobotomy
Copy link

No worries- any idea how long you'll be? I've made the changes locally and am just creating tests but am happy to just use it myself until you're finished.

@remyohajinwa
Copy link
Contributor

@mrlobotomy have you implemented all the endpoints. Maybe you can push, and we can compare what we have. I'm also writing tests. You can reach me on remyoha@gmail.com so that we can look at it together

@mrlobotomy
Copy link

mrlobotomy commented Nov 11, 2023

You can see a fork of the repo on my profile - with my WIP

@remyohajinwa
Copy link
Contributor

Good work! @mrlobotomy it seems you have really gone far with Assistants, Threads, Messages and Runs. I have worked on Assistants. is there a way we can merge so that you have mine (Assistants) and yours (Threads, Messages and Runs) ?

remyohajinwa pushed a commit to remyohajinwa/openai-java that referenced this issue Nov 11, 2023
remyohajinwa pushed a commit to remyohajinwa/openai-java that referenced this issue Nov 11, 2023
remyohajinwa pushed a commit to remyohajinwa/openai-java that referenced this issue Nov 11, 2023
TheoKanning added a commit that referenced this issue Nov 12, 2023
* #390 Create Assistant

#390 Create Assistant

* #390 Retrieve Assistant

* #390 Modify Assistant

* RemyOhajinwa#390 Delete Assistant

* RemyOhajinwa#390 List Assistants

* RemyOhajinwa#390 Create Assistant File

* RemyOhajinwa#390 Assistant File

* RemyOhajinwa#390 Assistant File

* RemyOhajinwa#390 Assistant File

* RemyOhajinwa#390 Assistant File

* Remove DeleteAssistantResult import

---------

Co-authored-by: Remy Ohajinwa <codechunkers@gmail.com>
Co-authored-by: Theo Kanning <TheoKanning@users.noreply.github.com>
@bjorkman
Copy link
Contributor

Haha I did too - almost done, but happy to use use your code instead. Maybe we should notify each other when we start implementing things? I will use mine until yours are merged, Theos excellent framework makes me think it will be just changing a few method names and then go, the principle is clear! :)

@TheoKanning
Copy link
Owner

This is included in 0.17.0 🎉

@bjorkman
Copy link
Contributor

Hm the assistants part is done, but not anything with using them - I think maybe this was closed a bit prematurely. I've done most of the other parts, will try to fix the last stuff today and make a PR

@vacuityv
Copy link
Contributor

I don't think it's done. Where is thread and run part? The only thing I can do with it now is careate assistant and file. And nothing else. WTF

@bjorkman
Copy link
Contributor

bjorkman commented Nov 13, 2023

I've been working on the other parts, but unfortunately I got sick today - maybe I can have something ready on wednesday. But I think @mrlobotomy is also working on it

@vacuityv
Copy link
Contributor

vacuityv commented Nov 13, 2023 via email

@TheoKanning TheoKanning reopened this Nov 13, 2023
@TheoKanning
Copy link
Owner

Sorry for the confusion here, I have some time tonight and I'll see how far I can get on this

@vacuityv
Copy link
Contributor

@TheoKanning I also have some time available, and there are a few parts that still need to be completed: threads, messages, and runs. Could you please assign the tasks and allocate some to me as well, to avoid wasting time by developing the same parts separately? The tool in the assistants section also needs some modifications. When the type is “function,” parameters need to be added.

@TheoKanning
Copy link
Owner

@vacuityv I just added Messages and one method (create) for Threads 037606e

I also fixed Tool issue and your builder issue.

Could you finish Threads? I'm done for now so go ahead and do Runs if you have time

@vacuityv
Copy link
Contributor

@TheoKanning OK. I will finish Threads and Runs.

@vacuityv
Copy link
Contributor

@TheoKanning I misunderstand your message. I will finish Threads.

@vacuityv
Copy link
Contributor

@TheoKanning I added a pr. If there is any issure in the pr, let me know and I will fix ASAP. Thanks for all of this.

@remyohajinwa
Copy link
Contributor

Sorry about the confusion and the hassle guys. I'm glad we were able to get on it

@bjorkman
Copy link
Contributor

Just made a PR for runs, so if the outstanding branches are merged I think we are feature complete?

@vacuityv
Copy link
Contributor

@bjorkman Your pr didn't pass the auto check. @TheoKanning Sorry to disturb you. When will this part finish. I can do some job if you don't have enough time for that. I want to do something to my own website so I need it. I'm sorry if this offends you.

@bjorkman
Copy link
Contributor

Ah JDk 1.8... I'll fix the offending line and make a new PR!

@bjorkman
Copy link
Contributor

Done!

@TheoKanning
Copy link
Owner

Just merged your Run code and released version 0.18.0!

Thank you so much! I appreciate all of the help when OpenAI drops a bunch of new features all at once like this

@vacuityv
Copy link
Contributor

vacuityv commented Nov 16, 2023

@TheoKanning sorry to disturb you again. I just met an issure here : #407

@vacuityv
Copy link
Contributor

@bjorkman hello man. Where is the required_action object in Run ? And "last_error" shoube be a object not a string ? Can you guys be careful because there is real person use this sdk. Please check again carefully. If you don't have time for it just let me know and I will do.

@vacuityv
Copy link
Contributor

@TheoKanning Can you give me higher permissions for this repository? This way, I can help you with some simple tasks, such as code review. I think it’s necessary to check it a bit, as I’ve encountered many issues while integrating with the assistant. Additionally, with a 14-hour time difference, this can ensure that the project is updated more promptly.

@remyohajinwa
Copy link
Contributor

@vacuityv I agree that maybe more people should have some permission so that we can be fast in fixing issues

@remyohajinwa
Copy link
Contributor

@vacuityv what issues are you facing currently with Assistants

@vacuityv
Copy link
Contributor

@bjorkman hello man. Where is the required_action object in Run ? And "last_error" shoube be a object not a string ? Can you guys be careful because there is real person use this sdk. Please check again carefully. If you don't have time for it just let me know and I will do.

@remyohajinwa this.

@vacuityv
Copy link
Contributor

@remyohajinwa and also when create assistant, the function is different from the chat function.

@remyohajinwa
Copy link
Contributor

@vacuityv I think it's the same function but maybe the way it was put in the class was not the proper way but the function in the documentation is the same as ChatFunction class. We just have to make sure we are using it the proper way. E.g I believe the right way should be to have Three classes (CodeInterpreter, Function, Retrieval) extending a Parent class.

then the Function class would have the parameters
private String type;
private ChatFunction function.

I believe that's the contract on the API

@remyohajinwa
Copy link
Contributor

@vacuityv I agree with you that we should be resolving these issues ASAP. Maybe we'll wait for @TheoKanning to give direction

@remyohajinwa
Copy link
Contributor

Also maybe we should have a group (maybe slack) so that everyone is informed on issues being worked on. This will help in tracking issues

@vacuityv
Copy link
Contributor

@remyohajinwa I don't think they are the same function. In chat part the code can auto excute the function. But in assistant part you need excute it when they require and send the function result to the assistant. They have different excute ways.

@bjorkman
Copy link
Contributor

@vacuityv Please feel free to improve it if you feel that something isn't working right - of course no code is perfect the first check-in, so we find errors and then fix them - that's the beauty of programming! :)

@vacuityv
Copy link
Contributor

I will fix what I found. Except the function.

@vacuityv
Copy link
Contributor

vacuityv commented Nov 16, 2023

make a pr here, hope someone can review it to make sure there is no issures: #408

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants