Skip to content
Snippets Groups Projects
Unverified Commit 0c0ba477 authored by Timothy Beamish's avatar Timothy Beamish Committed by GitHub
Browse files

Fix for Vertex not supporting system role (#11481)

parent caf66843
No related branches found
No related tags found
No related merge requests found
......@@ -13,10 +13,7 @@ from llama_index.core.base.llms.types import (
)
from llama_index.core.bridge.pydantic import Field, PrivateAttr
from llama_index.core.callbacks import CallbackManager
from llama_index.core.llms.callbacks import (
llm_chat_callback,
llm_completion_callback,
)
from llama_index.core.llms.callbacks import llm_chat_callback, llm_completion_callback
from llama_index.core.llms.llm import LLM
from llama_index.core.types import BaseOutputParser, PydanticProgramMode
from llama_index.llms.vertex.gemini_utils import create_gemini_client, is_gemini_model
......@@ -133,6 +130,7 @@ class Vertex(LLM):
return LLMMetadata(
is_chat_model=self._is_chat_model,
model_name=self.model,
system_role=MessageRole.USER, # Vertex does not support the default: MessageRole.SYSTEM
)
@property
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment