-
-
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
com.openai.unity 8.0.0 #235
base: main
Are you sure you want to change the base?
Conversation
StephenHodgson
commented
May 20, 2024
- Updated Assistants Beta v2
- Added BatchEndpoint
- Added VectorStoresEndpoint
- Updated Assistants Beta v2 - Added BatchEndpoint - Added VectorStoresEndpoint
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.
@StephenHodgson I believe the dynamic
keyword isn't supported on all platforms like WebGL and requires .NET 4.0 (doesn't work w/ 2.1).
Any chance we can avoid using dynamic
?
OpenAI/Packages/com.openai.unity/Runtime/Threads/CreateRunRequest.cs
Outdated
Show resolved
Hide resolved
OpenAI/Packages/com.openai.unity/Runtime/Threads/CreateThreadAndRunRequest.cs
Outdated
Show resolved
Hide resolved
OpenAI/Packages/com.openai.unity/Runtime/Threads/RunResponse.cs
Outdated
Show resolved
Hide resolved
OpenAI/Packages/com.openai.unity/Runtime/Threads/RunResponse.cs
Outdated
Show resolved
Hide resolved
OpenAI/Packages/com.openai.unity/Runtime/Threads/CreateRunRequest.cs
Outdated
Show resolved
Hide resolved
OpenAI/Packages/com.openai.unity/Runtime/Threads/CreateThreadAndRunRequest.cs
Outdated
Show resolved
Hide resolved
[EnumMember(Value = "text")] | ||
Text, | ||
[EnumMember(Value = "json_object")] | ||
Json |
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.
@StephenHodgson Is ResponseFormat auto
no longer supported?
I get the following error during AssistantRequest endpoint:
ArgumentException: Could not cast or convert from System.String to OpenAI.ResponseFormatObject.
Example JSON:
"object": "list",
"data": [
{
"id": "...",
"object": "assistant",
"created_at": ...,
"name": "...",
"description": "...",
"model": "gpt-4o",
"instructions": "...",
"tools": [],
"top_p": 1.0,
"temperature": 1.0,
"tool_resources": {},
"metadata": {},
"response_format": "auto"
}
]
}```
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.
Turns out this was if I retrieved an existing assistant which had the response_format set to 'auto'.
I've deleted the assistant for now to avoid the above issue, as it does look like auto
isn't part of the v2 assistant documentation.
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.
Turns out this was if I retrieved an existing assistant
Do you remember which version it was?
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.
It was also a v2 Assistant. So interestingly, it does seem to be possible to set it to auto
:)
var jsonContent = JsonConvert.SerializeObject(request, OpenAIClient.JsonSerializationOptions); | ||
UnityEngine.Debug.Log(jsonContent); |
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.
JFYI These two debug lines can probably be removed in final PR.
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.
np, was planning on it. Still working out the last changes needed
fixing a super old typo Co-authored-by: Stephen Hodgson <rage.against.the.pixel@gmail.com>