File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
openai-core/src/main/scala/io/cequence/openaiscala Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ object Retryable {
15
15
case _ : OpenAIScalaUnauthorizedException => false
16
16
17
17
// we retry on these
18
- case _ : OpenAIScalaClientTimeoutException => true
19
- case _ : OpenAIScalaRateLimitException => true
20
- case _ : OpenAIScalaServerErrorException => true
21
- case _ : OpenAIScalaEngineOverloadedException => true
18
+ case _ : OpenAIScalaClientTimeoutException => true
19
+ case _ : OpenAIScalaRateLimitException => true
20
+ case _ : OpenAIScalaServerErrorException => true
21
+ case _ : OpenAIScalaEngineOverloadedException => true
22
22
// generic case
23
- case _ : OpenAIScalaClientException => true
23
+ case _ : OpenAIScalaClientException => true
24
24
}
25
25
}
26
26
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ object OpenAIChatCompletionExtra {
45
45
)(
46
46
implicit ec : ExecutionContext ,
47
47
scheduler : Scheduler
48
- ): Future [ChatCompletionResponse ] =
48
+ ): Future [ChatCompletionResponse ] =
49
49
createChatCompletionWithFailoverSettings(
50
50
messages,
51
51
settings,
@@ -172,11 +172,13 @@ object OpenAIChatCompletionExtra {
172
172
s " ${taskNameForLoggingFinal.capitalize} finished in " + (new java.util.Date ().getTime - start.getTime) + " ms."
173
173
)
174
174
175
- json.asOpt[T ].getOrElse(
176
- throw new OpenAIScalaClientException (
177
- s " Failed to parse JSON response into the expected type. Response: $contentJson"
175
+ json
176
+ .asOpt[T ]
177
+ .getOrElse(
178
+ throw new OpenAIScalaClientException (
179
+ s " Failed to parse JSON response into the expected type. Response: $contentJson"
180
+ )
178
181
)
179
- )
180
182
}
181
183
}
182
184
You can’t perform that action at this time.
0 commit comments