-
-
Notifications
You must be signed in to change notification settings - Fork 61
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 v2 #224
Assistants v2 #224
Conversation
…ons, new auth methods with project key, addded audio stream as System.Stream and as encoded byte array,
# Conflicts: # OpenAI/Packages/com.openai.unity/Runtime/Threads/CreateRunRequest.cs
@@ -15,7 +15,7 @@ public sealed class OpenAIAuthInfo : IAuthInfo | |||
internal const string SessionKeyPrefix = "sess-"; | |||
internal const string OrganizationPrefix = "org-"; | |||
|
|||
public OpenAIAuthInfo(string apiKey, string organizationId = null) | |||
public OpenAIAuthInfo(string apiKey, string organizationId = null, string project = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this id have a prefix?
float? temperature = null, | ||
string language = null, | ||
TimestampGranularity timestampGranularity = TimestampGranularity.None) | ||
: this(audioStream, $"UserSpeech.wav", model, prompt, responseFormat, temperature, language, timestampGranularity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make audioName required param
{ "OpenAI-Beta", "assistants=v1"} | ||
{ "OpenAI-Beta", "assistants=v2"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes should be broken out into a separate PR from the projectId changes
internal static JsonSerializerSettings JsonSerializationOptions { get; } = new() | ||
public static JsonSerializerSettings JsonSerializationOptions { get; } = new() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these changes are breaking and will be done in 8.x which needs to first be completed upstream in OpenAI-DotNet
That would be awesome. Do you know when version 8 will be available? |
Hard to say as I do this in my free time. |
Closing this in favor of #235 |
This is a small rough update to v2 beta helpers with support for delta streaming and new authorization using project keys. It also includes updates to AudioTranscriptionRequest to handle encoded audio streams (I'm using Vorbis encoding in my project, which I may post later as a sample).
I don't have time to create proper test cases and documentation, so you can use this branch as a reference for future updates if you find it useful.