Skip to content

Commit abd9e32

Browse files
committed
Add s.ai.openai.embedding.options.dimensions documentation
1 parent c26bc55 commit abd9e32

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

models/spring-ai-openai/src/main/java/org/springframework/ai/openai/OpenAiEmbeddingOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,31 +86,31 @@ public OpenAiEmbeddingOptions build() {
8686
}
8787

8888
public String getModel() {
89-
return model;
89+
return this.model;
9090
}
9191

9292
public void setModel(String model) {
9393
this.model = model;
9494
}
9595

9696
public String getEncodingFormat() {
97-
return encodingFormat;
97+
return this.encodingFormat;
9898
}
9999

100100
public void setEncodingFormat(String encodingFormat) {
101101
this.encodingFormat = encodingFormat;
102102
}
103103

104104
public Integer getDimensions() {
105-
return dimensions;
105+
return this.dimensions;
106106
}
107107

108108
public void setDimensions(Integer dimensions) {
109109
this.dimensions = dimensions;
110110
}
111111

112112
public String getUser() {
113-
return user;
113+
return this.user;
114114
}
115115

116116
public void setUser(String user) {

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/embeddings/openai-embeddings.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ The prefix `spring.ai.openai.embedding` is property prefix that configures the `
9494
| spring.ai.openai.embedding.options.model | The model to use | text-embedding-ada-002 (other options: text-embedding-3-large, text-embedding-3-small)
9595
| spring.ai.openai.embedding.options.encodingFormat | The format to return the embeddings in. Can be either float or base64. | -
9696
| spring.ai.openai.embedding.options.user | A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. | -
97+
| spring.ai.openai.embedding.options.dimensions | The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. | -
9798
|====
9899

99100
NOTE: You can override the common `spring.ai.openai.base-url` and `spring.ai.openai.api-key` for the `ChatClient` and `EmbeddingClient` implementations.

0 commit comments

Comments
 (0)