Package com.sap.ai.sdk.foundationmodels.openai.model

# Class OpenAiChatCompletionParameters

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatCompletionParameters

@Deprecated public class OpenAiChatCompletionParameters extends OpenAiCompletionParameters
Deprecated.
OpenAI chat completion input parameters.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `OpenAiChatCompletionParameters.ResponseFormat`
  Deprecated.
  "response_format": { "type": "json_object" }

  ## Nested classes/interfaces inherited from class com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters

  `OpenAiCompletionParameters.OpenAiStreamOptions`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenAiChatCompletionParameters()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OpenAiChatCompletionParameters`
  `addMessages(OpenAiChatMessage... messages)`
  Deprecated.
  Add messages to the conversation.
  `protected boolean`
  `canEqual(Object other)`
  Deprecated.
  `boolean`
  `equals(Object o)`
  Deprecated.
  `int`
  `hashCode()`
  Deprecated.
  `OpenAiChatCompletionParameters`
  `setFunctions(List<OpenAiChatCompletionFunction> functions)`
  Deprecated.
  Use `tools` instead.
  `OpenAiChatCompletionParameters`
  `setResponseFormat(OpenAiChatCompletionParameters.ResponseFormat responseFormat)`
  Deprecated.
  An object specifying the format that the model must output.
  `OpenAiChatCompletionParameters`
  `setSeed(Integer seed)`
  Deprecated.
  If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.
  `OpenAiChatCompletionParameters`
  `setStop(String... values)`
  Deprecated.
  Up to four sequences where the API will stop generating further tokens.
  `OpenAiChatCompletionParameters`
  `setToolChoiceAuto()`
  Deprecated.
  Controls which (if any) function is called by the model.
  `OpenAiChatCompletionParameters`
  `setToolChoiceFunction(String functionName)`
  Deprecated.
  Controls which (if any) function is called by the model.
  `OpenAiChatCompletionParameters`
  `setToolChoiceNone()`
  Deprecated.
  Controls which (if any) function is called by the model.
  `OpenAiChatCompletionParameters`
  `setTools(List<OpenAiChatCompletionTool> tools)`
  Deprecated.
  A list of tools the model may call.
  `String`
  `toString()`
  Deprecated.

  ### Methods inherited from class com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters

  `enableStreaming, setFrequencyPenalty, setLogitBias, setMaxTokens, setN, setPresencePenalty, setTemperature, setTopP, setUser`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OpenAiChatCompletionParameters

    public OpenAiChatCompletionParameters()
    Deprecated.

- ## Method Details

  - ### setToolChoiceNone

    @Nonnull public OpenAiChatCompletionParameters 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

    @Nonnull public OpenAiChatCompletionParameters 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

    @Nonnull public OpenAiChatCompletionParameters setToolChoiceFunction(@Nonnull String functionName)
    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

    @Nonnull public OpenAiChatCompletionParameters setStop(@Nullable String... values)
    Deprecated.
    Description copied from class: `OpenAiCompletionParameters`
    Up to four sequences where the API will stop generating further tokens. The returned text won't contain the stop sequence.
    Overrides:
      `setStop` in class `OpenAiCompletionParameters`
    Parameters:
      `values` - The stop sequences.
    Returns:
      ${code this} instance for chaining.

  - ### addMessages

    @Nonnull public OpenAiChatCompletionParameters addMessages(@Nonnull OpenAiChatMessage... messages)
    Deprecated.
    Add messages to the conversation.
    Parameters:
      `messages` - The messages to add.
    Returns:
      this instance for chaining.

  - ### equals

    public boolean equals(Object o)
    Deprecated.
    Overrides:
      `equals` in class `OpenAiCompletionParameters`

  - ### canEqual

    protected boolean canEqual(Object other)
    Deprecated.
    Overrides:
      `canEqual` in class `OpenAiCompletionParameters`

  - ### hashCode

    public int hashCode()
    Deprecated.
    Overrides:
      `hashCode` in class `OpenAiCompletionParameters`

  - ### toString

    public String toString()
    Deprecated.
    Overrides:
      `toString` in class `OpenAiCompletionParameters`

  - ### 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 exceeded `max_tokens` or the conversation exceeded the max context length.

    Returns:
      `this`.

  - ### setSeed

    public OpenAiChatCompletionParameters setSeed(@Nullable Integer seed)
    Deprecated.
    If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
    Returns:
      `this`.

  - ### setFunctions

    @Deprecated public OpenAiChatCompletionParameters setFunctions(@Nullable List<OpenAiChatCompletionFunction> functions)
    Deprecated.
    Use `tools` instead.
    Array of function signatures to be called.
    Returns:
      `this`.

  - ### setTools

    public OpenAiChatCompletionParameters setTools(@Nullable List<OpenAiChatCompletionTool> tools)
    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`.