Skip to content

Commit 2797837

Browse files
[ML] Fixing Google Vertex AI Rerank task type location field (#127856) (#127866)
* Fixing rerank location * Update docs/changelog/127856.yaml * Refactor changelog
1 parent 7bd8c6e commit 2797837

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/changelog/127856.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 127856
2+
summary: Fix services API Google Vertex AI Rerank location field requirement
3+
area: Machine Learning
4+
type: bug
5+
issues: []

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public static InferenceServiceConfiguration get() {
342342

343343
configurationMap.put(
344344
LOCATION,
345-
new SettingsConfiguration.Builder(supportedTaskTypes).setDescription(
345+
new SettingsConfiguration.Builder(EnumSet.of(TaskType.TEXT_EMBEDDING)).setDescription(
346346
"Please provide the GCP region where the Vertex AI API(s) is enabled. "
347347
+ "For more information, refer to the {geminiVertexAIDocs}."
348348
)

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/googlevertexai/GoogleVertexAiServiceTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ public void testGetConfiguration() throws Exception {
898898
"sensitive": false,
899899
"updatable": false,
900900
"type": "str",
901-
"supported_task_types": ["text_embedding", "rerank"]
901+
"supported_task_types": ["text_embedding"]
902902
},
903903
"rate_limit.requests_per_minute": {
904904
"description": "Minimize the number of rate limit errors.",

0 commit comments

Comments
 (0)