Skip to content

Commit

Permalink
support vertexai dspy
Browse files Browse the repository at this point in the history
  • Loading branch information
jrj5423 committed Jan 17, 2025
1 parent 9d5f30c commit 2bab713
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion backend/app/rag/llms/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LLMProviderOption(BaseModel):
),
LLMProviderOption(
provider=LLMProvider.ANTHROPIC_VERTEX,
provider_display_name="Anthropic Vertex AI",
provider_display_name="Anthropic Vertex AI (Deprecated)",
provider_description="Anthropic's Claude models are now generally available through Vertex AI.",
provider_url="https://docs.anthropic.com/en/api/claude-on-vertex-ai",
default_llm_model="claude-3-5-sonnet@20241022",
Expand Down
5 changes: 4 additions & 1 deletion backend/app/utils/dspy.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def get_dspy_lm_by_llama_llm(llama_llm: BaseLLM) -> dspy.LM:
"Bedrock model " + llama_llm.model + " is not supported by dspy."
)
elif type(llama_llm) is Vertex:
raise ValueError("Vertex is not supported by dspy.")
return dspy.GoogleVertexAI(
model=llama_llm.model,
max_output_tokens=llama_llm.max_tokens or 8192,
)
elif type(llama_llm) is Ollama:
return DspyOllamaLocal(
model=llama_llm.model,
Expand Down
6 changes: 1 addition & 5 deletions frontend/app/src/pages/docs/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,9 @@ To learn more about OpenAI, please visit [OpenAI](https://platform.openai.com/).

To learn more about Google Gemini, please visit [Google Gemini](https://gemini.google.com/).

### Anthropic Vertex AI

To learn more about Anthropic Vertex AI, please visit [Anthropic Vertex AI](https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-claude)

### Vertex AI

To learn more about Vertex AI, please visit [Vertex AI](https://cloud.google.com/vertex-ai)
To learn more about Vertex AI, please visit [Vertex AI](https://cloud.google.com/vertex-ai).

### Amazon Bedrock

Expand Down

0 comments on commit 2bab713

Please sign in to comment.