-
Notifications
You must be signed in to change notification settings - Fork 728
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
Bump com.azure:azure-ai-openai from 1.0.0-beta.8 to 1.0.0-beta.9 #1247
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jdubois!
@@ -61,6 +61,8 @@ void should_stream_answer(String deploymentName, String gptVersion, boolean useA | |||
.logRequestsAndResponses(true) | |||
.build(); | |||
|
|||
Thread.sleep(60_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: it would be much easier to do it in @AfterEach
instead of adding Thread.sleep()
in each test:
@AfterEach
void afterEach() throws InterruptedException {
Thread.sleep(10_000L); // to avoid hitting rate limits
}
BTW, isn't 60 seconds too much?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error messages I got was telling me to wait 50 seconds, that’s why I put 60.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is strange, I've jsut run this test class without Thread.sleep
and it works fine.
But I have stumbled into another problem. Might be a bug on Azure side?
should_use_json_format
fails with the following error:
"error": {
"message": "'messages' must contain the word 'json' in some form, to use 'response_format' of type 'json_object'.",
"type": "invalid_request_error",
"param": "messages",
"code": null
}
Message definitely contains json: Return JSON with two fields: name and surname of Klaus Heisler.
I suspect it might be because the message text is base64 encoded?
2024/06/13 10:54:07,971 1342 [INFO ] [main] implementation.OpenAIClientImpl$OpenAIClientService.getChatCompletions - {"az.sdk.message":"HTTP request","method":"POST","url":"https://langchain4j-test-east-us.openai.azure.com//openai/deployments/gpt-4o/chat/completions?api-version=2024-05-01-preview","tryCount":1,"Date":"Thu, 13 Jun 2024 08:54:07 GMT","Content-Type":"application/json","x-ms-client-request-id":"be95b4c9-cbc5-4383-bd58-7c09e535853e","accept":"application/json","User-Agent":"langchain4j-azure-openai","redactedHeaders":"api-key","content-length":233,"body":"{\"messages\":[{\"content\":\"UmV0dXJuIGpzb24gd2l0aCB0d28gZmllbGRzOiBuYW1lIGFuZCBzdXJuYW1lIG9mIEtsYXVzIEhlaXNsZXIu\",\"role\":\"user\"}],\"max_tokens\":50,\"temperature\":0.0,\"stream\":true,\"model\":\"gpt-4o\",\"response_format\":{\"type\":\"json_object\"}}"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having 429 everywhere, so I'm basically stuck, and I just asked for an increased quota.
I believe the Thread.sleep
are indeed useless, the fix should be to have usable quota -> I'm removing them.
@langchain4j I believe this upgrade is important: I was having some bugs (in another project) with beta-8 and they are solved with beta-9. |
@jdubois are all tests passing for you? I have 10 failing tests... I guess the most critical is
I have commented on it above It works fine on |
@langchain4j for the |
Hi @jdubois, I can't see |
This updates to the latest version of Azure OpenAI Java SDK 1.0.0-beta.9 - see https://github.com/Azure/azure-sdk-for-java/releases?q=1.0.0-beta.9&expanded=true
There are some issues in the deployments and tests, and I believe they are caused by:
text-embedding-ada-002
,dall-e-3
,gpt-35-turbo-instruct
so they can be tested. Some of them are not available ineastus
so there's no way to test them at the moment, without starting a second instance inswedencentral
.Thread.sleep(60_000);
so we don't run out of quota quickly.