Interface ChatCompletionService
- 
                    
                    - All Implemented Interfaces:
 
 public interface ChatCompletionService
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public interfaceChatCompletionService.WithRawResponseA view of ChatCompletionService that provides access to raw HTTP responses for each method. 
 - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        withRawResponseabstract ChatCompletionService.WithRawResponse withRawResponse() Returns a view of this service that provides access to raw HTTP responses for each method. 
 - 
                                        withOptionsabstract ChatCompletionService withOptions(Consumer<ClientOptions.Builder> modifier) Returns a view of this service with the given option modifications applied. The original service is not modified. 
 - 
                                        messagesabstract MessageService messages() 
 - 
                                        createChatCompletion create(ChatCompletionCreateParams params) Starting a new project? We recommend trying Responses to take advantage of the latest OpenAI platform features. Compare Chat Completions with Responses. Creates a model response for the given chat conversation. Learn more in the text generation, vision, and audio guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide. 
 - 
                                        createabstract ChatCompletion create(ChatCompletionCreateParams params, RequestOptions requestOptions) 
 - 
                                        create<T extends Any> StructuredChatCompletion<T> create(StructuredChatCompletionCreateParams<T> params) Creates a model response for the given chat conversation. The model's structured output in JSON form will be deserialized automatically into an instance of the class T. See the SDK documentation for more details.
 - 
                                        create<T extends Any> StructuredChatCompletion<T> create(StructuredChatCompletionCreateParams<T> params, RequestOptions requestOptions) Creates a model response for the given chat conversation. The model's structured output in JSON form will be deserialized automatically into an instance of the class T. See the SDK documentation for more details.
 - 
                                        createStreaming@MustBeClosed() StreamResponse<ChatCompletionChunk> createStreaming(ChatCompletionCreateParams params) Starting a new project? We recommend trying Responses to take advantage of the latest OpenAI platform features. Compare Chat Completions with Responses. Creates a model response for the given chat conversation. Learn more in the text generation, vision, and audio guides. Parameter support can differ depending on the model used to generate the response, particularly for newer reasoning models. Parameters that are only supported for reasoning models are noted below. For the current state of unsupported parameters in reasoning models, refer to the reasoning guide. 
 - 
                                        createStreaming@MustBeClosed() abstract StreamResponse<ChatCompletionChunk> createStreaming(ChatCompletionCreateParams params, RequestOptions requestOptions) 
 - 
                                        createStreaming@MustBeClosed() StreamResponse<ChatCompletionChunk> createStreaming(StructuredChatCompletionCreateParams<?> params) Creates a streaming model response for the given chat conversation. The input parameters can define a JSON schema derived automatically from an arbitrary class to request a structured output in JSON form. However, that structured output is split over multiple streamed events, so it will not be deserialized automatically into an instance of that class. To deserialize the output, first use a helper class to accumulate the stream of events into a single output value. See the SDK documentation for full details. 
 - 
                                        createStreaming@MustBeClosed() StreamResponse<ChatCompletionChunk> createStreaming(StructuredChatCompletionCreateParams<?> params, RequestOptions requestOptions) 
 - 
                                        retrieveChatCompletion retrieve(String completionId) Get a stored chat completion. Only Chat Completions that have been created with the storeparameter set totruewill be returned.
 - 
                                        retrieveChatCompletion retrieve(String completionId, ChatCompletionRetrieveParams params, RequestOptions requestOptions) 
 - 
                                        retrieveChatCompletion retrieve(String completionId, ChatCompletionRetrieveParams params) 
 - 
                                        retrieveabstract ChatCompletion retrieve(ChatCompletionRetrieveParams params, RequestOptions requestOptions) 
 - 
                                        retrieveChatCompletion retrieve(ChatCompletionRetrieveParams params) 
 - 
                                        retrieveChatCompletion retrieve(String completionId, RequestOptions requestOptions) 
 - 
                                        updateChatCompletion update(String completionId, ChatCompletionUpdateParams params) Modify a stored chat completion. Only Chat Completions that have been created with the storeparameter set totruecan be modified. Currently, the only supported modification is to update themetadatafield.
 - 
                                        updateChatCompletion update(String completionId, ChatCompletionUpdateParams params, RequestOptions requestOptions) 
 - 
                                        updateChatCompletion update(ChatCompletionUpdateParams params) 
 - 
                                        updateabstract ChatCompletion update(ChatCompletionUpdateParams params, RequestOptions requestOptions) 
 - 
                                        listChatCompletionListPage list() List stored Chat Completions. Only Chat Completions that have been stored with the storeparameter set totruewill be returned.
 - 
                                        listabstract ChatCompletionListPage list(ChatCompletionListParams params, RequestOptions requestOptions) 
 - 
                                        listChatCompletionListPage list(ChatCompletionListParams params) 
 - 
                                        listChatCompletionListPage list(RequestOptions requestOptions) 
 - 
                                        deleteChatCompletionDeleted delete(String completionId) Delete a stored chat completion. Only Chat Completions that have been created with the storeparameter set totruecan be deleted.
 - 
                                        deleteChatCompletionDeleted delete(String completionId, ChatCompletionDeleteParams params, RequestOptions requestOptions) 
 - 
                                        deleteChatCompletionDeleted delete(String completionId, ChatCompletionDeleteParams params) 
 - 
                                        deleteabstract ChatCompletionDeleted delete(ChatCompletionDeleteParams params, RequestOptions requestOptions) 
 - 
                                        deleteChatCompletionDeleted delete(ChatCompletionDeleteParams params) 
 - 
                                        deleteChatCompletionDeleted delete(String completionId, RequestOptions requestOptions) 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-