Open saket223 opened 1 month ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @jpalvarezl @ralph-msft @trrwilson.
Hello, @saket223! I apologize for those documents being behind; as mentioned on the project page, Assistants has converged into the new v2.x combined Azure.AI.OpenAI
library, which in turn builds on OpenAI's official OpenAI
library. Can you please try using the latest Azure.AI.OpenAI
for your scenario? You can find examples both in the project README as well as in the tests; OpenAI's examples are also fully applicable, including this one: https://github.com/openai/openai-dotnet?tab=readme-ov-file#how-to-use-streaming-and-gpt-4o-vision-with-assistants (just be sure to use AzureOpenAIClient
!)
Hi @trrwilson I tried implementing this v2 version of assistants, but some part of it does not exist in the azure openAI library.
PageCollection
This part of code is not working.. The GetAllValues() does not exist
Type of issue
Code doesn't work No matter how I try to provide the filename, it rejects with a 400 error
Description
var file = await _assistantsClient.UploadFileAsync(uploads.First().Content.GetStream(), OpenAIFilePurpose.Assistants,uploads.First().Content.FileName);
[13:39:22.970 ERR] Additional properties are not allowed ('filename' was unexpected) Status: 400 (Bad Request)
Content: { "error": { "message": "Additional properties are not allowed ('filename' was unexpected)", "type": "invalid_request_error", "param": null, "code": null } }
var file = await _assistantsClient.UploadFileAsync("/pathToFile/abc.pdf", OpenAIFilePurpose.Assistants);
Status: 400 (Bad Request)
Content: { "error": { "message": "Additional properties are not allowed ('filename' was unexpected)", "type": "invalid_request_error", "param": null, "code": null } }
Page URL
https://learn.microsoft.com/en-us/dotnet/api/azure.ai.openai.assistants.assistantsclient.uploadfileasync?view=azure-dotnet-preview
Content source URL
https://github.com/Azure/azure-docs-sdk-dotnet/blob/master/xml/Azure.AI.OpenAI.Assistants/AssistantsClient.xml
Document Version Independent Id
1baff563-233f-3513-2052-29313fd91076
Article author
@azure-sdk
Metadata