-
Notifications
You must be signed in to change notification settings - Fork 288
Closed
Labels
bugCategory: Something isn't working and appears to be a defect in the client library.Category: Something isn't working and appears to be a defect in the client library.
Description
Describe the bug
I just upgraded from version 2.1.0 to 2.2.0 and this code (see below) started to fail with this error message
HTTP 400 (invalid_request_error: invalid_value)
Parameter: content[1].image_file.detail
Invalid value: 'Auto'. Supported values are: 'low', 'high', and 'auto'.
This is the code that fails
await _assistantClient.CreateMessageAsync(threadId, MessageRole.User, [
"<Some instructions>",
MessageContent.FromImageFileId(fileId, MessageImageDetail.Auto),
"""
Additional context: <Some more instructions>
"""
]
);
Steps to reproduce
- Create a chat assistant (using
AssistantClient
) - Create a vector store (using
VectorStoreClient
) - Upload 2 files (using
OpenAIFileClient
) - Adding one of the files to the vector store (using
VectorStoreClient
) - Creating a thread (using
AssistantClient
) and attaching the vector store to the thread - Creating a message (using
AssistantClient
) passing in the thread id and the other file uploaded viaOpenAIFileClient
It's at this step (where I attach the file) that I indicate that the image detail should be set to 'auto' via this code MessageContent.FromImageFileId(fileId, MessageImageDetail.Auto)
and this is what fails (because 'Auto' is capitalized)
Code snippets
OS
macOS
.NET version
8
Library version
2.2.0
Metadata
Metadata
Assignees
Labels
bugCategory: Something isn't working and appears to be a defect in the client library.Category: Something isn't working and appears to be a defect in the client library.