chat_gpt_sdk icon indicating copy to clipboard operation
chat_gpt_sdk copied to clipboard

Support for Assistants V2

Open Bassiuz opened this issue 1 year ago • 14 comments

Is there any plan to support Assistants V2 in the future? Currently it is not possible to query into 4o, as it only supports the new Assistants V2 integration

{error: {message: The requested model 'gpt-4o' cannot be used with the Assistants API in v1. Follow the migration guide to upgrade to v2: https://platform.openai.com/docs/assistants/migration., type: invalid_request_error, param: model, code: unsupported_model}}

Bassiuz avatar May 22 '24 08:05 Bassiuz

@Bassiuz I Add Assistants V2 in Coming soon

redevrx avatar May 23 '24 03:05 redevrx

@redevrx I saw that you built the Assistants V2 and pushed it to main! I tested it and it works fantastic! However, I found a small bug in parsing the thread response. This fixes it:

https://github.com/redevrx/chat_gpt_sdk/pull/114

Bassiuz avatar May 31 '24 09:05 Bassiuz

Thank you I will merge to main

redevrx avatar May 31 '24 16:05 redevrx

Hi, any info when 3.0.9 will be available on pub dev?

muka459 avatar Jun 01 '24 01:06 muka459

Hi, any info when 3.0.9 will be available on pub dev?

I'm working on run v2. If this one is finished I'll be able to release the next version.

redevrx avatar Jun 02 '24 06:06 redevrx

Hi! thanks for your effort into building this amazing package! I just wonder when will you release the next version? I would like to use assistant v2 at my course final project lol

lzydaphne avatar Jun 08 '24 05:06 lzydaphne

@muka459 @lzydaphne New Release chat_gpt_sdk 3.0.9

redevrx avatar Jun 08 '24 16:06 redevrx

Huge thanks bro! let me try this out

lzydaphne avatar Jun 11 '24 01:06 lzydaphne

Pardon my ignorance, but how do I use the v2? What do I have to change in my current code? The documentation is not yet updated, right? I'm not sure where I can find more information on how to implement this. Thanks for you work in any case!

biodegradable000 avatar Jun 24 '24 20:06 biodegradable000

@biodegradable000 you can update last version

openAI.thread.v2;
openAI. assistants.v2;

redevrx avatar Jun 25 '24 06:06 redevrx

Thank you!

biodegradable000 avatar Sep 06 '24 20:09 biodegradable000

Do runs already work with v2? I get an error "The requested model 'gpt-4o' cannot be used with the Assistants API in v1. " when I try to create a run with an gpt4o assistant. Is it me or is this not working yet? Should this be working?

final runRequest = CreateRun(assistantId: assistantID);
runResult = await globals.chatAI.threads.runs.createRun(threadId: threadID, request: runRequest);

Because the second line is where the error is thrown. Thank you!

biodegradable000 avatar Sep 08 '24 21:09 biodegradable000

You should change code to v2

globals.chatAI.threads.v2.runs

redevrx avatar Sep 10 '24 03:09 redevrx

Thank you, that actually worked! It was not obvious for me how to use v2. It would be great if you could update the documentation and your examples to the new possibilities. That would be very helpful.

Thanks a lot!

biodegradable000 avatar Sep 10 '24 11:09 biodegradable000