Skip to content

Commit b03a6c9

Browse files
committed
Fix the default value of OpenAI chat option
- The OpenAI chat option metadata can be set only when the store value is enabled. - Change the default value from empty map to null
1 parent b08b9e8 commit b03a6c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiChatOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public class OpenAiChatOptions implements FunctionCallingOptions {
181181
/**
182182
* Developer-defined tags and values used for filtering completions in the <a href="https://platform.openai.com/chat-completions">dashboard</a>.
183183
*/
184-
private @JsonProperty("metadata") Map<String, String> metadata = new HashMap<>();
184+
private @JsonProperty("metadata") Map<String, String> metadata;
185185
/**
186186
* OpenAI Tool Function Callbacks to register with the ChatModel.
187187
* For Prompt Options the functionCallbacks are automatically enabled for the duration of the prompt execution.

0 commit comments

Comments
 (0)