mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(fix)(common) prevent NullPointerException for jsonFormat (#2365)
This commit is contained in:
@@ -30,7 +30,7 @@ public class OpenAiModelFactory implements ModelFactory, InitializingBean {
|
||||
.timeout(Duration.ofSeconds(modelConfig.getTimeOut()))
|
||||
.logRequests(modelConfig.getLogRequests())
|
||||
.logResponses(modelConfig.getLogResponses());
|
||||
if (modelConfig.getJsonFormat()) {
|
||||
if (modelConfig.getJsonFormat() != null && modelConfig.getJsonFormat()) {
|
||||
openAiChatModelBuilder.strictJsonSchema(true)
|
||||
.responseFormat(modelConfig.getJsonFormatType());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user