From d38fbaa171a070cd40b2fedd9ddd8a04353815bb Mon Sep 17 00:00:00 2001 From: David Zhao Date: Sat, 24 Aug 2024 14:01:51 -0700 Subject: [PATCH] Updated readme with LLM options --- README.md | 34 +++++++++++++++++++ .../livekit/plugins/clova/stt.py | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce4b8bd7f..6c6e9ed75 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ The following plugins are available today: | Plugin | Features | | ---------------------------------------------------------------------------------- | ------------------------------- | +| [livekit-plugins-anthropic](https://pypi.org/project/livekit-plugins-anthropic/) | LLM | | [livekit-plugins-azure](https://pypi.org/project/livekit-plugins-azure/) | STT, TTS | | [livekit-plugins-cartesia](https://pypi.org/project/livekit-plugins-cartesia/) | TTS | | [livekit-plugins-deepgram](https://pypi.org/project/livekit-plugins-deepgram/) | STT | @@ -70,6 +71,37 @@ The following plugins are available today: | [livekit-plugins-openai](https://pypi.org/project/livekit-plugins-openai/) | LLM, STT, TTS | | [livekit-plugins-silero](https://pypi.org/project/livekit-plugins-silero/) | VAD | +## Using LLM models + +Agents framework supports a wide range of LLMs and hosting providers. + +### OpenAI-compatible models + +Most LLM providers offer an OpenAI-compatible API, which can be used with the `livekit-plugins-openai` plugin. + +```python +from livekit.plugins.openai.llm import LLM +``` + +- OpenAI: `LLM(model="gpt-4o")` +- Azure: `LLM.with_azure(azure_endpoint="", azure_deployment="")` +- Fireworks: `LLM.with_fireworks(api_key="", model="")` +- Groq: `LLM.with_groq(api_key="", model="")` +- OctoAI: `LLM.with_octo(api_key="", model="")` +- Ollama: `LLM.with_ollama(base_url="http://localhost:11434/v1", model="")` +- Perplexity: `LLM.with_perplexity(api_key="", model="")` +- TogetherAI: `LLM.with_together(api_key="", model="")` + +### Anthropic Claude + +Anthropic Claude can be used with `livekit-plugins-anthropic` plugin. + +```python +from livekit.plugins.anthropic.llm import LLM + +myllm = LLM(model="claude-3-opus-20240229") +``` + ## Concepts - **Agent**: A function that defines the workflow of a programmable, server-side participant. This is your application code. @@ -153,7 +185,9 @@ class MyPlugin(Plugin): ``` +
+ diff --git a/livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/stt.py b/livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/stt.py index 0a07b3683..2f279f6e6 100644 --- a/livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/stt.py +++ b/livekit-plugins/livekit-plugins-clova/livekit/plugins/clova/stt.py @@ -26,7 +26,7 @@ from .common import resample_audio from .log import logger -from .models import ClovaSttLanguages, ClovaSpeechAPIType, clova_languages_mapping +from .models import ClovaSpeechAPIType, ClovaSttLanguages, clova_languages_mapping class STT(stt.STT):
LiveKit Ecosystem
Realtime SDKsReact Components · Browser · Swift Components · iOS/macOS/visionOS · Android · Flutter · React Native · Rust · Node.js · Python · Unity (web) · Unity (beta)