how to use AnthropicVertex or haiku with google ll...
# ask-ai
j
how to use AnthropicVertex or haiku with google llm package?
t
Thanks for reaching out, Tyler. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thank you for reaching out! I wanted to share that the Google LLM package is specially made for Google's Gemini models and doesn’t support third-party models like Anthropic's Claude family, including Haiku. But no worries—if you’d like to use Anthropic's Claude models, you can do so with their dedicated Anthropic plugin. Here’s a simple way to get started with Anthropic's Claude Haiku models: • First, install the Anthropic plugin by running:
pip install livekit-plugins-anthropic
• Next, set your API key as an environment variable:
ANTHROPIC_API_KEY
• Then, you can use the plugin in your code like this:
Copy code
from livekit.plugins import anthropic

# Using Claude Haiku
llm = anthropic.LLM(model="claude-3-5-haiku-20241022")
If you were hoping to use Anthropic models on Google's infrastructure, that’s not supported at the moment. But if you’re interested, I’d be happy to help you explore Google’s own efficient models like
gemini-1.5-flash-8b
. Just let me know what you’d like to do next—I’m here to help! Sources: plugins/google/README.md | livekit-plugins/livekit-plugins-anthropic/livekit/plugins/anthropic/llm.py | pipeline-llm/google_llm.py | AI Agents Framework | livekit/livekit_composite | DeepWiki
j
yes i want to use anthropic model on the google vertex platform
t
I totally understand where you're coming from! Currently, using Anthropic models, including Claude Haiku, on the Google Vertex platform isn't supported. The platform is tailored to work with Google's own Gemini models and doesn't integrate with third-party models like Anthropic's Claude family. If you're interested in working with Anthropic models, the best way is to use the Anthropic plugin directly, as we talked about earlier. But if you'd like, I’d be more than happy to help you explore Google's Gemini models on Vertex instead. Just let me know which path sounds best for you, and we’ll take it from there together!
j
how would i modify the google plugin to use haiku
t
Thank you for reaching out! I wanted to share that the Google plugin is specially designed to work with Google's Gemini models, so it can't be adjusted to support Anthropic's Claude Haiku models. Each plugin in LiveKit is created to connect with a specific provider's API, and the system doesn’t support mixing providers within a single plugin. If you're interested in using the Claude Haiku models, the best approach would be to use the Anthropic plugin as a separate integration. I’m here to help—just let me know if you'd like some step-by-step guidance on setting up and using the Anthropic plugin!