Class EmbeddingCreateParams.Body.Builder
- 
                    
                    - All Implemented Interfaces:
 
 public final class EmbeddingCreateParams.Body.BuilderA builder for Body. 
- 
                
                    
                    - 
                                
                            
                                Method Summary- 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        inputfinal EmbeddingCreateParams.Body.Builder input(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. 
 - 
                                        inputfinal EmbeddingCreateParams.Body.Builder input(JsonField<EmbeddingCreateParams.Input> input) Sets Builder.input to an arbitrary JSON value. You should usually call Builder.input with a well-typed Input value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        inputfinal EmbeddingCreateParams.Body.Builder input(String string) Alias for calling input with Input.ofString(string).
 - 
                                        inputOfArrayOfStringsfinal EmbeddingCreateParams.Body.Builder inputOfArrayOfStrings(List<String> arrayOfStrings) Alias for calling input with Input.ofArrayOfStrings(arrayOfStrings).
 - 
                                        inputOfArrayOfTokensfinal EmbeddingCreateParams.Body.Builder inputOfArrayOfTokens(List<Long> arrayOfTokens) Alias for calling input with Input.ofArrayOfTokens(arrayOfTokens).
 - 
                                        inputOfArrayOfTokenArraysfinal EmbeddingCreateParams.Body.Builder inputOfArrayOfTokenArrays(List<List<Long>> arrayOfTokenArrays) Alias for calling input with Input.ofArrayOfTokenArrays(arrayOfTokenArrays).
 - 
                                        modelfinal EmbeddingCreateParams.Body.Builder model(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. 
 - 
                                        modelfinal EmbeddingCreateParams.Body.Builder model(JsonField<EmbeddingModel> model) Sets Builder.model to an arbitrary JSON value. You should usually call Builder.model with a well-typed EmbeddingModel value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        modelfinal EmbeddingCreateParams.Body.Builder model(String value) Sets model to an arbitrary String. You should usually call model with a well-typed EmbeddingModel constant instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        dimensionsfinal EmbeddingCreateParams.Body.Builder dimensions(Long dimensions) The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3and later models.
 - 
                                        dimensionsfinal EmbeddingCreateParams.Body.Builder dimensions(JsonField<Long> dimensions) Sets Builder.dimensions to an arbitrary JSON value. You should usually call Builder.dimensions with a well-typed Long value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        encodingFormatfinal EmbeddingCreateParams.Body.Builder encodingFormat(EmbeddingCreateParams.EncodingFormat encodingFormat) The format to return the embeddings in. Can be either floatorbase64.
 - 
                                        encodingFormatfinal EmbeddingCreateParams.Body.Builder encodingFormat(JsonField<EmbeddingCreateParams.EncodingFormat> encodingFormat) Sets Builder.encodingFormat to an arbitrary JSON value. You should usually call Builder.encodingFormat with a well-typed EncodingFormat value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        userfinal EmbeddingCreateParams.Body.Builder user(String user) A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more. 
 - 
                                        userfinal EmbeddingCreateParams.Body.Builder user(JsonField<String> user) Sets Builder.user to an arbitrary JSON value. You should usually call Builder.user with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value. 
 - 
                                        additionalPropertiesfinal EmbeddingCreateParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        putAdditionalPropertyfinal EmbeddingCreateParams.Body.Builder putAdditionalProperty(String key, JsonValue value) 
 - 
                                        putAllAdditionalPropertiesfinal EmbeddingCreateParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties) 
 - 
                                        removeAdditionalPropertyfinal EmbeddingCreateParams.Body.Builder removeAdditionalProperty(String key) 
 - 
                                        removeAllAdditionalPropertiesfinal EmbeddingCreateParams.Body.Builder removeAllAdditionalProperties(Set<String> keys) 
 - 
                                        buildfinal EmbeddingCreateParams.Body build() Returns an immutable instance of Body. Further updates to this Builder will not mutate the returned instance. The following fields are required: .input() .model()
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-