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

Error uploading file when using Azure.AI.OpenAI.Assistants #44241

Open
rjpedrosa opened this issue May 24, 2024 · 3 comments
Open

Error uploading file when using Azure.AI.OpenAI.Assistants #44241

rjpedrosa opened this issue May 24, 2024 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@rjpedrosa
Copy link

Library name and version

Azure.AI.OpenAI.Assistants

Query/Question

When I try to upload a file for further use in an assistant, I get this error

Azure.RequestFailedException: 'Additional properties are not allowed ('filename' was unexpected)
Status: 400 (Bad Request)

Here's my code:

string LocalFileFullPath = "e:\\contrato.docx";

Response<OpenAIFile> uploadAssistantFileResponse = await client.UploadFileAsync(
    localFilePath: LocalFileFullPath,
    purpose: OpenAIFilePurpose.Assistants
);


OpenAIFile uploadedAssistantFile = uploadAssistantFileResponse.Value;

Any help? Thanks

Environment

No response

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels May 24, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @trrwilson.

@Freddeb
Copy link

Freddeb commented Jun 15, 2024

Hello @rjpedrosa ,

Maybe you could try to test with the last version of the library Azure.AI.OpenAI 2.0.0-beta.1 (It is a major move, you can find more info here). If you prefer to stick with the old version of the library, you could find this post also interesting.

@rjpedrosa
Copy link
Author

Hi,

Yes, I moved on and now using OpenAI's new .NET library, as I am using their API directly and not Azure Services.

Thank for your help. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team OpenAI question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

2 participants