how to use llm that not supported by livekit (LLM)...
# ask-ai
n
how to use llm that not supported by livekit (LLM) integrations
t
Thanks for reaching out, Mohamed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You can use a large language model (LLM) that is not officially supported by LiveKit integrations in several ways: • OpenAI-Compatible API: If your LLM provider offers an OpenAI-compatible API, you can use the OpenAI plugin with a custom
base_url
and
api_key
to connect. This method works for many providers that follow the OpenAI API standard. • Custom LLM Node: Implement a custom LLM node by extending the base LLM interface and providing the required methods for streaming and tool calls. This allows you to integrate any provider or custom logic. • Ollama for Local Models: Use Ollama to run open-source or fine-tuned models locally and integrate them with LiveKit. • Contribute a Plugin: If you want official support for a new provider, you can contribute a plugin following LiveKit's contribution guidelines. For most cases, using the OpenAI-compatible API approach is the simplest and requires minimal setup. Once your LLM instance is configured, you can use it in an
AgentSession
just like any supported provider. Sources: livekit-plugins/livekit-plugins-anthropic/README.md | Large language model (LLM) integrations | LiveKit Docs | External data and RAG | LiveKit Docs | Working with plugins | LiveKit Docs