-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vertex Model garden models #960
Comments
Do you have a reference to which models are you referring to? |
LIke mistral and anthropic models through vertex |
Ok @Kludex, basically you can use the already existing models, but with the vertex counterpart clients of the mistral and anthropic packages. Feels really silly that there is no docs for this. if "mistral" in model.identity.id:
import sys
from mistralai_gcp.models.usermessage import UserMessage as MistralUserMessage
sys.modules['pydantic_ai.models.mistral'].MistralUserMessage = MistralUserMessage
from mistralai_gcp import MistralGoogleCloud
self._pydantic_model = MistralModel(
model.extra['pydantic_ai_alias'],
client=MistralGoogleCloud(
project_id=provider.project_id,
region=provider.locations[0]
),
)
elif "claude" in model.identity.id:
from anthropic import AsyncAnthropicVertex
self._pydantic_model = AnthropicModel(
model.extra["pydantic_ai_alias"],
anthropic_client=AsyncAnthropicVertex(
project_id=provider.project_id,
region=provider.locations[0]
)
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to use other models in the vertex model garden, or is it just gemini models through vertex?
The text was updated successfully, but these errors were encountered: