diff --git a/tests/unit/aiplatform/test_language_models.py b/tests/unit/aiplatform/test_language_models.py index 2106b0815f..4395fdca40 100644 --- a/tests/unit/aiplatform/test_language_models.py +++ b/tests/unit/aiplatform/test_language_models.py @@ -2359,12 +2359,12 @@ def test_text_embedding(self): {"content": "What is life?"}, { "content": "Foo", - "taskType": "RETRIEVAL_DOCUMENT", + "task_type": "RETRIEVAL_DOCUMENT", "title": "Bar", }, { "content": "Baz", - "taskType": "CLASSIFICATION", + "task_type": "CLASSIFICATION", }, ] prediction_parameters = mock_predict.call_args[1]["parameters"] diff --git a/vertexai/language_models/_language_models.py b/vertexai/language_models/_language_models.py index 1a646ca601..7f2f15cb7d 100644 --- a/vertexai/language_models/_language_models.py +++ b/vertexai/language_models/_language_models.py @@ -1084,7 +1084,7 @@ def get_embeddings(self, if isinstance(text, TextEmbeddingInput): instance = {"content": text.text} if text.task_type: - instance["taskType"] = text.task_type + instance["task_type"] = text.task_type if text.title: instance["title"] = text.title elif isinstance(text, str):