Class EmbeddingCreateParams
- 
                    
                    - All Implemented Interfaces:
- 
                            
                            com.openai.core.Params
 
 public final class EmbeddingCreateParams implements Params Creates an embedding vector representing the input text. 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public final classEmbeddingCreateParams.BuilderA builder for EmbeddingCreateParams. public final classEmbeddingCreateParams.Bodypublic final classEmbeddingCreateParams.InputInput text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. public final classEmbeddingCreateParams.EncodingFormatThe format to return the embeddings in. Can be either floatorbase64.
 - 
                                
                            
                                Method SummaryModifier and Type Method Description final EmbeddingCreateParams.Inputinput()Input text to embed, encoded as a string or array of tokens. final EmbeddingModelmodel()ID of the model to use. final Optional<Long>dimensions()The number of dimensions the resulting output embeddings should have. final Optional<EmbeddingCreateParams.EncodingFormat>encodingFormat()The format to return the embeddings in. final Optional<String>user()A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. final JsonField<EmbeddingCreateParams.Input>_input()Returns the raw JSON value of input. final JsonField<EmbeddingModel>_model()Returns the raw JSON value of model. final JsonField<Long>_dimensions()Returns the raw JSON value of dimensions. final JsonField<EmbeddingCreateParams.EncodingFormat>_encodingFormat()Returns the raw JSON value of encodingFormat. final JsonField<String>_user()Returns the raw JSON value of user. final Map<String, JsonValue>_additionalBodyProperties()final Headers_additionalHeaders()Additional headers to send with the request. final QueryParams_additionalQueryParams()Additional query param to send with the request. final EmbeddingCreateParams.BuildertoBuilder()final EmbeddingCreateParams.Body_body()Headers_headers()The full set of headers in the parameters, including both fixed and additional headers. QueryParams_queryParams()The full set of query params in the parameters, including both fixed and additional query params. Booleanequals(Object other)IntegerhashCode()StringtoString()final static EmbeddingCreateParams.Builderbuilder()Returns a mutable builder for constructing an instance of EmbeddingCreateParams. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        inputfinal EmbeddingCreateParams.Input input() Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for all embedding models), cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens. In addition to the per-input token limit, all embedding models enforce a maximum of 300,000 tokens summed across all inputs in a single request. 
 - 
                                        modelfinal EmbeddingModel model() ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them. 
 - 
                                        dimensionsfinal Optional<Long> dimensions() The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3and later models.
 - 
                                        encodingFormatfinal Optional<EmbeddingCreateParams.EncodingFormat> encodingFormat() The format to return the embeddings in. Can be either floatorbase64.
 - 
                                        userfinal Optional<String> user() A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. 
 - 
                                        _inputfinal JsonField<EmbeddingCreateParams.Input> _input() Returns the raw JSON value of input. Unlike input, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _modelfinal JsonField<EmbeddingModel> _model() Returns the raw JSON value of model. Unlike model, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _dimensionsfinal JsonField<Long> _dimensions() Returns the raw JSON value of dimensions. Unlike dimensions, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _encodingFormatfinal JsonField<EmbeddingCreateParams.EncodingFormat> _encodingFormat() Returns the raw JSON value of encodingFormat. Unlike encodingFormat, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _userfinal JsonField<String> _user() Returns the raw JSON value of user. Unlike user, this method doesn't throw if the JSON field has an unexpected type. 
 - 
                                        _additionalBodyPropertiesfinal Map<String, JsonValue> _additionalBodyProperties() 
 - 
                                        _additionalHeadersfinal Headers _additionalHeaders() Additional headers to send with the request. 
 - 
                                        _additionalQueryParamsfinal QueryParams _additionalQueryParams() Additional query param to send with the request. 
 - 
                                        toBuilderfinal EmbeddingCreateParams.Builder toBuilder() 
 - 
                                        _bodyfinal EmbeddingCreateParams.Body _body() 
 - 
                                        _headersHeaders _headers() The full set of headers in the parameters, including both fixed and additional headers. 
 - 
                                        _queryParamsQueryParams _queryParams() The full set of query params in the parameters, including both fixed and additional query params. 
 - 
                                        builderfinal static EmbeddingCreateParams.Builder builder() Returns a mutable builder for constructing an instance of EmbeddingCreateParams. The following fields are required: .input() .model()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-