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

Exception rethrow issue with 3.18.0 #292

Open
sidag99 opened this issue Feb 18, 2025 · 3 comments
Open

Exception rethrow issue with 3.18.0 #292

sidag99 opened this issue Feb 18, 2025 · 3 comments

Comments

@sidag99
Copy link

sidag99 commented Feb 18, 2025

With the addition of retries in 3.18.0, the exception message instead of containing valid errors like "Auth exception" for an invalid API key, throws errors like "Request failed after 1 attempt". And when I rethrow it using OpenAIExceptionConverter.rethrow(e), it does not provide a valid OpenAIException.

SimpleOpenAIAzure simpleAzureOpenAI = SimpleOpenAIAzure.builder()
.apiKey(azureOpenAIKey)
.baseUrl(fullEndpoint)
.apiVersion(apiVersion)
.build();

I am not even using retries explicitly.

There should be some way to either bypass retries, or get the relevant exception message.

This works fine for 3.17.2

Please let me know if this needs more information, I am new to this.

@sashirestela
Copy link
Owner

Please, activate your logs and share the log file

@sidag99
Copy link
Author

sidag99 commented Feb 19, 2025

These are the logs for the 2 versions. Testing with an invalid API key, but valid endpoint.

log_for_3.17.2_behaviour.log
log_for_3.18.0_behaviour.log

Please let me know if you need anything else @sashirestela

@sashirestela
Copy link
Owner

How are you handling the exceptions for simple-openai?
Could you share that part of your code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants