Skip to content

Commit af9880f

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

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
@@ -348,7 +348,7 @@ public static InferenceServiceConfiguration get() {
348348

349349
configurationMap.put(
350350
LOCATION,
351-
new SettingsConfiguration.Builder(supportedTaskTypes).setDescription(
351+
new SettingsConfiguration.Builder(EnumSet.of(TaskType.TEXT_EMBEDDING)).setDescription(
352352
"Please provide the GCP region where the Vertex AI API(s) is enabled. "
353353
+ "For more information, refer to the {geminiVertexAIDocs}."
354354
)

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)