Package com.openai.models.chat.completions
See: Description
-
Class Summary Class Description Builder A builder for ChatCompletion. Builder A builder for Choice. FinishReason The reason the model stopped generating tokens. Builder A builder for Logprobs. Logprobs Log probability information for the choice. Choice ServiceTier Specifies the latency tier to use for processing the request. ChatCompletion Represents a chat completion response returned by model, based on the provided input. Builder A builder for ChatCompletionAssistantMessageParam. Builder A builder for Audio. Audio Data about a previous audio response from the model. ChatCompletionRequestAssistantMessageContentPart Learn about text inputs. Content The contents of the assistant message. Builder A builder for FunctionCall. FunctionCall Deprecated and replaced by tool_calls
.ChatCompletionAssistantMessageParam Messages sent by the model in response to user messages. Builder A builder for ChatCompletionAudio. ChatCompletionAudio If the audio output modality is requested, this object contains data about the audio response from the model. Builder A builder for ChatCompletionAudioParam. Format Specifies the output audio format. Voice The voice the model uses to respond. ChatCompletionAudioParam Parameters for audio output. Builder A builder for ChatCompletionChunk. Builder A builder for Choice. Builder A builder for Delta. Builder A builder for FunctionCall. FunctionCall Deprecated and replaced by tool_calls
.Role The role of the author of this message. Builder A builder for ToolCall. Builder A builder for Function. Function Type The type of the tool. ToolCall Delta A chat completion delta generated by streamed model responses. FinishReason The reason the model stopped generating tokens. Builder A builder for Logprobs. Logprobs Log probability information for the choice. Choice ServiceTier Specifies the latency tier to use for processing the request. ChatCompletionChunk Represents a streamed chunk of a chat completion response returned by the model, based on the provided input. Builder A builder for File. Builder A builder for FileObject. FileObject File Learn about file inputs for text generation. ChatCompletionContentPart Learn about text inputs. Builder A builder for ChatCompletionContentPartImage. Builder A builder for ImageUrl. Detail Specifies the detail level of the image. ImageUrl ChatCompletionContentPartImage Learn about image inputs. Builder A builder for ChatCompletionContentPartInputAudio. Builder A builder for InputAudio. Format The format of the encoded audio data. InputAudio ChatCompletionContentPartInputAudio Learn about audio inputs. Builder A builder for ChatCompletionContentPartRefusal. ChatCompletionContentPartRefusal Builder A builder for ChatCompletionContentPartText. ChatCompletionContentPartText Learn about text inputs. Builder A builder for ChatCompletionCreateParams. Builder A builder for Body. Body FunctionCallMode none
means the model will not call a function and instead generates a message.FunctionCall Deprecated in favor of tool_choice
.Builder A builder for Function. Function Builder A builder for LogitBias. LogitBias Modify the likelihood of specified tokens appearing in the completion. Builder A builder for Metadata. Metadata Set of 16 key-value pairs that can be attached to an object. Modality ResponseFormat An object specifying the format that the model must output. ServiceTier Specifies the latency tier to use for processing the request. Stop Not supported with latest reasoning models o3
ando4-mini
.Builder A builder for WebSearchOptions. SearchContextSize High level guidance for the amount of context window space to use for the search. Builder A builder for UserLocation. Builder A builder for Approximate. Approximate Approximate location parameters for the search. UserLocation Approximate location parameters for the search. WebSearchOptions This tool searches the web for relevant results to use in a response. ChatCompletionCreateParams Starting a new project? Builder A builder for ChatCompletionDeleteParams. ChatCompletionDeleteParams Delete a stored chat completion. Builder A builder for ChatCompletionDeleted. ChatCompletionDeleted Builder A builder for ChatCompletionDeveloperMessageParam. Content The contents of the developer message. ChatCompletionDeveloperMessageParam Developer-provided instructions that the model should follow, regardless of messages sent by the user. Builder A builder for ChatCompletionFunctionCallOption. ChatCompletionFunctionCallOption Specifying a particular function via {"name": "my_function"}
forces the model to call that function.Builder A builder for ChatCompletionFunctionMessageParam. ChatCompletionFunctionMessageParam Builder A builder for ChatCompletionListPage. ChatCompletionListPage Builder A builder for ChatCompletionListPageAsync. ChatCompletionListPageAsync Builder A builder for ChatCompletionListPageResponse. ChatCompletionListPageResponse An object representing a list of Chat Completions. Builder A builder for ChatCompletionListParams. Builder A builder for Metadata. Metadata Set of 16 key-value pairs that can be attached to an object. Order Sort order for Chat Completions by timestamp. ChatCompletionListParams List stored Chat Completions. Builder A builder for ChatCompletionMessage. Builder A builder for Annotation. Builder A builder for UrlCitation. UrlCitation A URL citation when using web search. Annotation A URL citation when using web search. Builder A builder for FunctionCall. FunctionCall Deprecated and replaced by tool_calls
.ChatCompletionMessage A chat completion message generated by the model. ChatCompletionMessageParam Developer-provided instructions that the model should follow, regardless of messages sent by the user. Builder A builder for ChatCompletionMessageToolCall. Builder A builder for Function. Function The function that the model called. ChatCompletionMessageToolCall ChatCompletionModality Builder A builder for ChatCompletionNamedToolChoice. Builder A builder for Function. Function ChatCompletionNamedToolChoice Specifies a tool the model should use. Builder A builder for ChatCompletionPredictionContent. Content The content that should be matched when generating a model response. ChatCompletionPredictionContent Static predicted output content, such as the content of a text file that is being regenerated. Builder A builder for ChatCompletionRetrieveParams. ChatCompletionRetrieveParams Get a stored chat completion. ChatCompletionRole The role of the author of a message Builder A builder for ChatCompletionStoreMessage. ChatCompletionStoreMessage A chat completion message generated by the model. Builder A builder for ChatCompletionStreamOptions. ChatCompletionStreamOptions Options for streaming response. Builder A builder for ChatCompletionSystemMessageParam. Content The contents of the system message. ChatCompletionSystemMessageParam Developer-provided instructions that the model should follow, regardless of messages sent by the user. Builder A builder for ChatCompletionTokenLogprob. Builder A builder for TopLogprob. TopLogprob ChatCompletionTokenLogprob Builder A builder for ChatCompletionTool. ChatCompletionTool Auto none
means the model will not call any tool and instead generates a message.ChatCompletionToolChoiceOption Controls which (if any) tool is called by the model. Builder A builder for ChatCompletionToolMessageParam. Content The contents of the tool message. ChatCompletionToolMessageParam Builder A builder for ChatCompletionUpdateParams. Builder A builder for Body. Body Builder A builder for Metadata. Metadata Set of 16 key-value pairs that can be attached to an object. ChatCompletionUpdateParams Modify a stored chat completion. Builder A builder for ChatCompletionUserMessageParam. Content The contents of the user message. ChatCompletionUserMessageParam Messages sent by an end user, containing prompts or additional context information. Choice StructuredChatCompletion A wrapper for ChatCompletion that provides type-safe access to the choices when using the Structured Outputs feature to deserialize a JSON response to an instance of an arbitrary class. Builder StructuredChatCompletionCreateParams A wrapper for ChatCompletionCreateParams that provides a type-safe Builder that can record the responseType used to derive a JSON schema from an arbitrary class when using the Structured Outputs feature. StructuredChatCompletionMessage A wrapper for ChatCompletionMessage that provides type-safe access to the content when using the Structured Outputs feature to deserialize a JSON response to an instance of an arbitrary class. -
Enum Summary Enum Description Known An enum containing FinishReason's known values. Value An enum containing FinishReason's known values, as well as an _UNKNOWN member. Known An enum containing ServiceTier's known values. Value An enum containing ServiceTier's known values, as well as an _UNKNOWN member. Known An enum containing Format's known values. Value An enum containing Format's known values, as well as an _UNKNOWN member. Known An enum containing Voice's known values. Value An enum containing Voice's known values, as well as an _UNKNOWN member. Known An enum containing Role's known values. Value An enum containing Role's known values, as well as an _UNKNOWN member. Known An enum containing Type's known values. Value An enum containing Type's known values, as well as an _UNKNOWN member. Known An enum containing FinishReason's known values. Value An enum containing FinishReason's known values, as well as an _UNKNOWN member. Known An enum containing ServiceTier's known values. Value An enum containing ServiceTier's known values, as well as an _UNKNOWN member. Known An enum containing Detail's known values. Value An enum containing Detail's known values, as well as an _UNKNOWN member. Known An enum containing Format's known values. Value An enum containing Format's known values, as well as an _UNKNOWN member. Known An enum containing FunctionCallMode's known values. Value An enum containing FunctionCallMode's known values, as well as an _UNKNOWN member. Known An enum containing Modality's known values. Value An enum containing Modality's known values, as well as an _UNKNOWN member. Known An enum containing ServiceTier's known values. Value An enum containing ServiceTier's known values, as well as an _UNKNOWN member. Known An enum containing SearchContextSize's known values. Value An enum containing SearchContextSize's known values, as well as an _UNKNOWN member. Known An enum containing Order's known values. Value An enum containing Order's known values, as well as an _UNKNOWN member. Known An enum containing ChatCompletionModality's known values. Value An enum containing ChatCompletionModality's known values, as well as an _UNKNOWN member. Known An enum containing ChatCompletionRole's known values. Value An enum containing ChatCompletionRole's known values, as well as an _UNKNOWN member. Known An enum containing Auto's known values. Value An enum containing Auto's known values, as well as an _UNKNOWN member. -
Interface Summary Interface Description Visitor An interface that defines how to map each variant of Content to a value of type T. Visitor An interface that defines how to map each variant of ChatCompletionRequestAssistantMessageContentPart to a value of type T. Visitor An interface that defines how to map each variant of ChatCompletionContentPart to a value of type T. Visitor An interface that defines how to map each variant of FunctionCall to a value of type T. Visitor An interface that defines how to map each variant of ResponseFormat to a value of type T. Visitor An interface that defines how to map each variant of Stop to a value of type T. Visitor An interface that defines how to map each variant of Content to a value of type T. Visitor An interface that defines how to map each variant of ChatCompletionMessageParam to a value of type T. Visitor An interface that defines how to map each variant of Content to a value of type T. Visitor An interface that defines how to map each variant of Content to a value of type T. Visitor An interface that defines how to map each variant of ChatCompletionToolChoiceOption to a value of type T. Visitor An interface that defines how to map each variant of Content to a value of type T. Visitor An interface that defines how to map each variant of Content to a value of type T.