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

[BUG] Token limitations don't seem to get thrown from the client library #46782

Open
adameska opened this issue Oct 23, 2024 · 1 comment
Open
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

@adameska
Copy link

Library name and version

Azure.AI.OpenAI

Describe the bug

When trying to call a chat completion it seems like if there is an error nothing is ever thrown and it appears like the application just sits. I have a controller action that calls with a user request that catches a generic exception and the catch is never hit nor is anything ever returned. I was hitting the token limit (the only way i knew this was replicating the messages in the playground) and had no idea. Here is a very small snippet of the code illustrating the line causing it.

ChatClient chatClient = _azureOpenAIClient.GetChatClient("gpt-4o-mini");
chatClient.CompleteChat(conversationMessages, options); //this never returns, never throws, i have no idea if this is a slow request or it immediately crashed. conversationMessages is over the token limit.

Expected behavior

An meaningful exception should be thrown if an error occurred.

Actual behavior

Call never returns anything.

Reproduction Steps

ChatClient chatClient = _azureOpenAIClient.GetChatClient("gpt-4o-mini");
//some large request in conversation messages
chatClient.CompleteChat(conversationMessages, options); //this never returns, never throws, i have no idea if this is a slow request or it immediately crashed. conversationMessages is over the token limit.

Environment

Windows 11 .netcore 8 VS 17.11

@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 Oct 23, 2024
Copy link

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

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

1 participant