Class OpenAiChatCompletionParameters
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatCompletionParameters
Deprecated.
OpenAI chat completion input parameters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeprecated."response_format": { "type": "json_object" }Nested classes/interfaces inherited from class com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters
OpenAiCompletionParameters.OpenAiStreamOptions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddMessages(OpenAiChatMessage... messages) Deprecated.Add messages to the conversation.protected booleanDeprecated.booleanDeprecated.inthashCode()Deprecated.setFunctions(List<OpenAiChatCompletionFunction> functions) Deprecated.setResponseFormat(OpenAiChatCompletionParameters.ResponseFormat responseFormat) Deprecated.An object specifying the format that the model must output.Deprecated.If specified, our system will make a best effort to sample deterministically, such that repeated requests with the sameseedand parameters should return the same result.Deprecated.Up to four sequences where the API will stop generating further tokens.Deprecated.Controls which (if any) function is called by the model.setToolChoiceFunction(String functionName) Deprecated.Controls which (if any) function is called by the model.Deprecated.Controls which (if any) function is called by the model.setTools(List<OpenAiChatCompletionTool> tools) Deprecated.A list of tools the model may call.toString()Deprecated.Methods inherited from class com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters
enableStreaming, setFrequencyPenalty, setLogitBias, setMaxTokens, setN, setPresencePenalty, setTemperature, setTopP, setUser
-
Constructor Details
-
OpenAiChatCompletionParameters
public OpenAiChatCompletionParameters()Deprecated.
-
-
Method Details
-
setToolChoiceNone
Deprecated.Controls which (if any) function is called by the model. `none` means the model will not call a function and instead generates a message.- Returns:
- ${code this} instance for chaining.
-
setToolChoiceAuto
Deprecated.Controls which (if any) function is called by the model. `none` means the model will not call a function and instead generates a message.- Returns:
- ${code this} instance for chaining.
-
setToolChoiceFunction
Deprecated.Controls which (if any) function is called by the model. Specifying a particular function forces the model to call that function.- Parameters:
functionName- The name of the function to call.- Returns:
- ${code this} instance for chaining.
-
setStop
Deprecated.Description copied from class:OpenAiCompletionParametersUp to four sequences where the API will stop generating further tokens. The returned text won't contain the stop sequence.- Overrides:
setStopin classOpenAiCompletionParameters- Parameters:
values- The stop sequences.- Returns:
- ${code this} instance for chaining.
-
addMessages
Deprecated.Add messages to the conversation.- Parameters:
messages- The messages to add.- Returns:
- this instance for chaining.
-
equals
Deprecated.- Overrides:
equalsin classOpenAiCompletionParameters
-
canEqual
Deprecated.- Overrides:
canEqualin classOpenAiCompletionParameters
-
hashCode
public int hashCode()Deprecated.- Overrides:
hashCodein classOpenAiCompletionParameters
-
toString
Deprecated.- Overrides:
toStringin classOpenAiCompletionParameters
-
setResponseFormat
public OpenAiChatCompletionParameters setResponseFormat(@Nullable OpenAiChatCompletionParameters.ResponseFormat responseFormat) Deprecated.An object specifying the format that the model must output. Setting to { "type": "json_object" } enables JSON mode, which guarantees the message the model generates is valid JSON.Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if
finish_reason="length", which indicates the generation exceededmax_tokensor the conversation exceeded the max context length.- Returns:
this.
-
setSeed
Deprecated.If specified, our system will make a best effort to sample deterministically, such that repeated requests with the sameseedand parameters should return the same result. Determinism is not guaranteed, and you should refer to thesystem_fingerprintresponse parameter to monitor changes in the backend.- Returns:
this.
-
setFunctions
@Deprecated public OpenAiChatCompletionParameters setFunctions(@Nullable List<OpenAiChatCompletionFunction> functions) Deprecated.Usetoolsinstead.Array of function signatures to be called.- Returns:
this.
-
setTools
Deprecated.A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.- Returns:
this.
-
toolsinstead.