Interface EmbeddingsCreateRequestInput
- All Known Implementing Classes:
EmbeddingsCreateRequestInput.InnerString,EmbeddingsCreateRequestInput.ListOfStrings
public interface EmbeddingsCreateRequestInput
Input text to get embeddings for, encoded as a string. To get embeddings for multiple inputs in a
single request, pass an array of strings. Each input must not exceed 2048 tokens in length.
Unless you are embedding code, we suggest replacing newlines (\\n) in your input with a single
space, as we have observed inferior results when newlines are present.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordHelper class to createStringthat implementsEmbeddingsCreateRequestInput.static final recordHelper class to createList<String>that implementsEmbeddingsCreateRequestInput. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionCreator to enable deserialization ofString.createListOfStrings(List<String> val) Creator to enable deserialization ofList<String>.
-
Method Details
-
createListOfStrings
@Nonnull static EmbeddingsCreateRequestInput.ListOfStrings createListOfStrings(@Nonnull List<String> val) Creator to enable deserialization ofList<String>.- Parameters:
val- the value to use- Returns:
- a new instance of
EmbeddingsCreateRequestInput.ListOfStrings.
-
create
Creator to enable deserialization ofString.- Parameters:
val- the value to use- Returns:
- a new instance of
EmbeddingsCreateRequestInput.InnerString.
-