wenjin272 commented on code in PR #1410:
URL: https://github.com/apache/flink-agents/pull/1410#discussion_r4638001466


##########
integrations/embedding-models/openai/src/main/java/org/apache/flink/agents/integrations/embeddingmodels/openai/OpenAIEmbeddingModelConnection.java:
##########
@@ -180,29 +177,22 @@ static String blankToNull(String value) {
         return value == null || value.isBlank() ? null : value;
     }
 
-    /** Parses {@code request_timeout} seconds with the same rules as the 
OpenAI chat connection. */
-    static Duration parseRequestTimeout(Object raw) {
-        if (raw == null) {
-            return Duration.ofSeconds(DEFAULT_REQUEST_TIMEOUT_SECONDS);
+    /** Resolves the request timeout and rounds positive values up to SDK 
milliseconds. */
+    static Duration parseRequestTimeout(ResourceDescriptor descriptor) {
+        Duration duration =
+                descriptor.getDurationArgument(

Review Comment:
   Could we also update 
[`EmbeddingIntegrationAgent.embeddingConnection()`](https://github.com/apache/flink-agents/blob/26b7963eaf5ee7294faf6ced51cf4cba5bf9cc95/e2e-test/flink-agents-end-to-end-tests-integration/src/test/java/org/apache/flink/agents/integration/test/EmbeddingIntegrationAgent.java#L67)
 to use `Duration.ofSeconds(60)` for the OpenAI `request_timeout`? It still 
passes `60`, which changes from 60 seconds to 60 milliseconds with the new 
parser. This unintentionally shortens all four SDK timeouts and could cause the 
existing OpenAI embedding E2E test to time out.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to