Skip to content

Commit f0bfd76

Browse files
committed
Add encoding format, dimensions
1 parent a652d4e commit f0bfd76

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model/OpenAiEmbeddingParameters.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ public class OpenAiEmbeddingParameters {
4040
@Setter(onParam_ = @Nullable)
4141
private String inputType;
4242

43+
/**
44+
* The format to return the embeddings in. Can be either `float` or `base64`. Defaults to `float`.
45+
*/
46+
@JsonProperty("encoding_format")
47+
@Setter(onParam_ = @Nullable)
48+
private String encodingFormat;
49+
50+
/**
51+
* The number of dimensions the resulting output embeddings should have. Only supported in
52+
* `text-embedding-3` and later models.
53+
*/
54+
@JsonProperty("dimensions")
55+
@Setter(onParam_ = @Nullable)
56+
private Integer dimensions;
57+
4358
/**
4459
* Input text to get embeddings for, encoded as a string. The number of input tokens varies
4560
* depending on what model you are using. Unless you're embedding code, we suggest replacing

0 commit comments

Comments
 (0)