Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assistants Beta V2 #285

Open
StephenHodgson opened this issue Apr 21, 2024 · 9 comments · May be fixed by #309 or RageAgainstThePixel/com.openai.unity#235
Open

Assistants Beta V2 #285

StephenHodgson opened this issue Apr 21, 2024 · 9 comments · May be fixed by #309 or RageAgainstThePixel/com.openai.unity#235
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@StephenHodgson
Copy link
Member

StephenHodgson commented Apr 21, 2024

OpenAI has released a new version of the Assistants, which significantly changes the API surface.

Migration Guide

Subtasks:

@StephenHodgson StephenHodgson added the enhancement New feature or request label Apr 21, 2024
@StephenHodgson StephenHodgson added this to the 8.0.0 milestone Apr 21, 2024
@StephenHodgson StephenHodgson self-assigned this Apr 21, 2024
@edvanr
Copy link

edvanr commented Apr 22, 2024

Great to see this stuff making its way into the code!

Just a quick look at the create run docs, there are a few more still missing...

additional_instructions
Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.

additional_messages
Adds additional messages to the thread before creating the run.

top_p
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

max_prompt_tokens
The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run.

max_completion_tokens
The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run

truncation_strategy
Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run.

response_format
Specifies the format that the model must output.

What is the best way to track these also? I can have a go at implementing some of them

@StephenHodgson
Copy link
Member Author

I wasn't planning on tracking these individually.

@edvanr
Copy link

edvanr commented Apr 22, 2024

I wonder if there is some way we could consume the OpenAI API spec so that when new properties get released it can be partially automated?

https://github.com/openai/openai-openapi/blob/master/openapi.yaml

@StephenHodgson
Copy link
Member Author

StephenHodgson commented Apr 22, 2024

I wonder if there is some way we could consume the OpenAI API spec so that when new properties get released it can be partially automated?

https://github.com/openai/openai-openapi/blob/master/openapi.yaml

I already have something locally that I use, but it's not good enough for all the edgecases.

But yes I do use that repository spec to generate out code for this library.

@minzdrav
Copy link

Hi @StephenHodgson
Thank you for the great library!
OpenAI has released gpt-4o model and it's not compatible with Assistants v1 API. Throwing 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" }
Is it possible to generate a library with Assistants v2?

@StephenHodgson
Copy link
Member Author

Sorry I haven't had time to get around to it.

I'll see what I can do this weekend.

@edvanr
Copy link

edvanr commented May 14, 2024

I'm also happy to help but I might need a quick kick off with you on the best way to approach some of these changes. I'll ping you on Discord

@StephenHodgson
Copy link
Member Author

Most of the work is done. Just finishing up streaming support and fixing a few bugs with tool cache

@delsoul
Copy link

delsoul commented May 20, 2024

Большая часть работы сделана. Просто завершаю поддержку потоковой передачи и исправляю несколько ошибок с кешем инструментов.

Hello! When can we expect GPT-4o support? Considering that most of the work has already been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
4 participants