Skip to content

Commit d096f32

Browse files
committed
Update error message
1 parent 0f13dcf commit d096f32

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tool/Sources/OpenAIService/APIs/OpenAIChatCompletionsService.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,10 @@ actor OpenAIChatCompletionsService: ChatCompletionsStreamAPI, ChatCompletionsAPI
338338
}
339339
let decoder = JSONDecoder()
340340
let error = try? decoder.decode(CompletionAPIError.self, from: data)
341-
throw error ?? ChatGPTServiceError.responseInvalid
341+
throw error ?? ChatGPTServiceError.otherError(
342+
text +
343+
"\n\nPlease check your model settings, some capabilities may not be supported by the model."
344+
)
342345
}
343346

344347
let stream = ResponseStream<StreamDataChunk>(result: result) {

0 commit comments

Comments
 (0)