-
Notifications
You must be signed in to change notification settings - Fork 346
Closed
Labels
area: imagesThis item is related to Images.This item is related to Images.needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.
Description
Describe the bug
- Docs link: https://platform.openai.com/docs/guides/images-vision?api-mode=responses&format=file
- While running the code sample, https://github.com/justinyoo/openai-dotnet/blob/docs/images-vision/docs/guides/images-vision/responses/analyze_images_passing_file.cs, it throws an exception like:
Unhandled exception. System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: )
Parameter: input
Invalid input: Expected file type to be a supported format: .pdf but got .png.
Steps to reproduce
- Run this code: https://github.com/justinyoo/openai-dotnet/blob/docs/images-vision/docs/guides/images-vision/responses/analyze_images_passing_file.cs
- See the error below:
Unhandled exception. System.ClientModel.ClientResultException: HTTP 400 (invalid_request_error: )
Parameter: input
Invalid input: Expected file type to be a supported format: .pdf but got .png.
at OpenAI.ClientPipelineExtensions.ProcessMessage(ClientPipeline pipeline, PipelineMessage message, RequestOptions options)
at OpenAI.Responses.OpenAIResponseClient.CreateResponse(BinaryContent content, RequestOptions options)
at OpenAI.Responses.OpenAIResponseClient.CreateResponse(IEnumerable`1 inputItems, ResponseCreationOptions options, CancellationToken cancellationToken)
at Program.<Main>$(String[] args) in C:\Users\justi\dev\gh\openai-dotnet\docs\guides\images-vision\responses\analyze_images_passing_file.cs:line 23
at Program.<Main>(String[] args)
Code snippets
Here's the code snippet link: https://github.com/justinyoo/openai-dotnet/blob/docs/images-vision/docs/guides/images-vision/responses/analyze_images_passing_file.csOS
Windows
.NET version
.NET 10 RC1
Library version
2.4
Metadata
Metadata
Assignees
Labels
area: imagesThis item is related to Images.This item is related to Images.needs-author-feedbackWorkflow: More information is needed from author to address the issue.Workflow: More information is needed from author to address the issue.questionCategory: The issue is seeking information about the library or its usage.Category: The issue is seeking information about the library or its usage.