Skip to content

Commit 0404c07

Browse files
Adjusting the google vertex ai batch size to match documentation (#128518)
1 parent 6d63670 commit 0404c07

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/googlevertexai/GoogleVertexAiServiceFields.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ public class GoogleVertexAiServiceFields {
1414
public static final String PROJECT_ID = "project_id";
1515

1616
/**
17-
* In `us-central-1` the max input size is `250`, but in every other region it's `5` according
18-
* to these docs: https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings/get-text-embeddings.
19-
*
20-
* Therefore, being conservative and setting it to `5`.
17+
* According to https://cloud.google.com/vertex-ai/docs/quotas#text-embedding-limits the limit is `250`.
2118
*/
22-
static final int EMBEDDING_MAX_BATCH_SIZE = 5;
19+
static final int EMBEDDING_MAX_BATCH_SIZE = 250;
2320

2421
}

0 commit comments

Comments
 (0)