Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions athena/app/services/llm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from langchain_anthropic import ChatAnthropic
from langchain_core.language_models.chat_models import BaseChatModel
from langchain_google_genai import ChatGoogleGenerativeAI
from langchain_google_vertexai import ChatVertexAI

from athena.app.services.base_service import BaseService
from athena.chat_models.custom_chat_openai import CustomChatOpenAI
Expand Down Expand Up @@ -50,6 +51,17 @@ def get_model(
max_tokens_to_sample=max_output_tokens,
max_retries=3,
)
elif model_name.startswith("vertex:"):
# example: model_name="vertex:gemini-2.5-pro"
vertex_model = model_name.split("vertex:", 1)[1]
return ChatVertexAI(
model_name=vertex_model,
project="prometheus-code-agent",
location="us-central1",
temperature=temperature,
max_output_tokens=max_output_tokens,
max_retries=3,
)
elif "gemini" in model_name:
return ChatGoogleGenerativeAI(
model=model_name,
Expand Down
Loading
Loading