Azure / azure-sdk-for-net

This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
MIT License
5.35k stars 4.66k forks source link

Azure AI Open AI Assistant Modify Assistant cannot remove last file [BUG] #44632

Open yoon172 opened 3 months ago

yoon172 commented 3 months ago

Library name and version

Azure.AI.OpenAI.Assistants 1.0.0-beta.4

Describe the bug

UpdateAssistantAsync cannot remove the last fileId attached to the assistant.

Expected behavior

Ex) An assistant that has one fileId attached to it. I should be able to remove this with the UpdateAssistantAsync method with the UpdateAssistantOptions.FileId.remove() .

Actual behavior

The method above does not remove the last fileId after checking the GET assistant endpoint.

Reproduction Steps

Have an assistant with only 1 file ID attached to it. Do a UpdateAssistantAsync with the appropriate assistantId and UpdateAssistantOptions to remove the fileID.

Environment

Dotnet 7.0.2 Rider 2023.2.3.

github-actions[bot] commented 3 months ago

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

yoon172 commented 3 months ago

Interestingly, file ID removal works if there are more than 1 file IDs attached to the assistant.