Package org.springframework.ai.deepseek
Class DeepSeekChatOptions
java.lang.Object
org.springframework.ai.deepseek.DeepSeekChatOptions
- All Implemented Interfaces:
ChatOptions,ModelOptions,ToolCallingChatOptions
Chat completions options for the DeepSeek chat API.
DeepSeek
chat completion
- Author:
- Geng Rong, Sebastien Deleuze
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeepSeekChatOptions(@Nullable String model, @Nullable Double frequencyPenalty, @Nullable Integer maxTokens, @Nullable Double presencePenalty, @Nullable ResponseFormat responseFormat, @Nullable List<String> stop, @Nullable Double temperature, @Nullable Double topP, @Nullable Boolean logprobs, @Nullable Integer topLogprobs, @Nullable List<DeepSeekApi.FunctionTool> tools, @Nullable Object toolChoice, @Nullable List<ToolCallback> toolCallbacks, @Nullable Map<String, Object> toolContext) -
Method Summary
Modifier and TypeMethodDescriptionstatic DeepSeekChatOptions.Builderbuilder()A builder to create a newToolCallingChatOptionsinstance.boolean@Nullable DoubleReturns the frequency penalty to use for the chat.@Nullable Boolean@Nullable IntegerReturns the maximum number of tokens to use for the chat.getModel()Returns the model to use for the chat.@Nullable DoubleReturns the presence penalty to use for the chat.@Nullable ResponseFormatgetStop()Returns the stop sequences to use for the chat.Returns the temperature to use for the chat.@Nullable List<ToolCallback>ToolCallbacks to be registered with the ChatModel.@Nullable ObjectGet the configured tool context.@Nullable List<DeepSeekApi.FunctionTool>getTools()@Nullable IntegergetTopK()Returns the top K to use for the chat.@Nullable Integer@Nullable DoublegetTopP()Returns the top P to use for the chat.inthashCode()mutate()Returns a newToolCallingChatOptions.Builderinitialized with the values of thisToolCallingChatOptions.
-
Constructor Details
-
DeepSeekChatOptions
protected DeepSeekChatOptions(@Nullable String model, @Nullable Double frequencyPenalty, @Nullable Integer maxTokens, @Nullable Double presencePenalty, @Nullable ResponseFormat responseFormat, @Nullable List<String> stop, @Nullable Double temperature, @Nullable Double topP, @Nullable Boolean logprobs, @Nullable Integer topLogprobs, @Nullable List<DeepSeekApi.FunctionTool> tools, @Nullable Object toolChoice, @Nullable List<ToolCallback> toolCallbacks, @Nullable Map<String, Object> toolContext)
-
-
Method Details
-
builder
Description copied from interface:ToolCallingChatOptionsA builder to create a newToolCallingChatOptionsinstance.- Returns:
- Returns a new
ChatOptions.Builder.
-
getModel
Description copied from interface:ChatOptionsReturns the model to use for the chat.- Specified by:
getModelin interfaceChatOptions- Returns:
- the model to use for the chat
-
getFrequencyPenalty
Description copied from interface:ChatOptionsReturns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenaltyin interfaceChatOptions- Returns:
- the frequency penalty to use for the chat
-
getMaxTokens
Description copied from interface:ChatOptionsReturns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokensin interfaceChatOptions- Returns:
- the maximum number of tokens to use for the chat
-
getPresencePenalty
Description copied from interface:ChatOptionsReturns the presence penalty to use for the chat.- Specified by:
getPresencePenaltyin interfaceChatOptions- Returns:
- the presence penalty to use for the chat
-
getResponseFormat
-
getStopSequences
Description copied from interface:ChatOptionsReturns the stop sequences to use for the chat.- Specified by:
getStopSequencesin interfaceChatOptions- Returns:
- the stop sequences to use for the chat
-
getStop
-
getTemperature
Description copied from interface:ChatOptionsReturns the temperature to use for the chat.- Specified by:
getTemperaturein interfaceChatOptions- Returns:
- the temperature to use for the chat
-
getTopP
Description copied from interface:ChatOptionsReturns the top P to use for the chat.- Specified by:
getTopPin interfaceChatOptions- Returns:
- the top P to use for the chat
-
getTools
-
getToolChoice
-
getToolCallbacks
Description copied from interface:ToolCallingChatOptionsToolCallbacks to be registered with the ChatModel.- Specified by:
getToolCallbacksin interfaceToolCallingChatOptions
-
getLogprobs
-
getTopLogprobs
-
getTopK
Description copied from interface:ChatOptionsReturns the top K to use for the chat.- Specified by:
getTopKin interfaceChatOptions- Returns:
- the top K to use for the chat
-
getToolContext
Description copied from interface:ToolCallingChatOptionsGet the configured tool context.- Specified by:
getToolContextin interfaceToolCallingChatOptions- Returns:
- the tool context map.
-
mutate
Description copied from interface:ToolCallingChatOptionsReturns a newToolCallingChatOptions.Builderinitialized with the values of thisToolCallingChatOptions. Narrows the return type ofChatOptions.mutate()so generic tool calling code can chain methods without casting.- Specified by:
mutatein interfaceChatOptions- Specified by:
mutatein interfaceToolCallingChatOptions
-
hashCode
public int hashCode() -
equals
-