Llama Index plugin for LiveKit Agents
Project description
LiveKit Plugins Llama Index
Agent Framework plugin for using Llama Index. Currently supports Query Engine and Chat Engine.
Install
pip install livekit-plugins-llama-index
Query Engine
Query Engine is primarily used for RAG. See example voice agent
Chat Engine
Chat Engine can be used as an LLM within the framework.
# load the existing index
storage_context = StorageContext.from_defaults(persist_dir=<mydir>)
index = load_index_from_storage(storage_context)
async def entrypoint(ctx: JobContext):
...
chat_engine = index.as_chat_engine(chat_mode=ChatMode.CONTEXT)
assistant = VoicePipelineAgent(
vad=silero.VAD.load(),
stt=deepgram.STT(),
llm=llama_index.LLM(chat_engine=chat_engine),
tts=openai.TTS(),
chat_ctx=initial_ctx,
)
full example here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file livekit_plugins_llama_index-0.2.3.tar.gz
.
File metadata
- Download URL: livekit_plugins_llama_index-0.2.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5587c9a037f4ab9043b3b683b4bfe70c368f96ca8d782b85614503a385dbaf |
|
MD5 | 139542c1f0aefb81d65d55c852d522d9 |
|
BLAKE2b-256 | 343db2c15a4160f6ab2994a8264e227dddc76cb7bf3598a0978523e9d61f11e5 |
File details
Details for the file livekit_plugins_llama_index-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: livekit_plugins_llama_index-0.2.3-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d808034772af7d3e4342d23dc0746d63ada1ef1351ae170607dc8cb0b369b354 |
|
MD5 | 22e2cd92285718bc03cfd383c8ce2e9f |
|
BLAKE2b-256 | aa7be3b8df5a5e4aa2d8451a4f415c6796c2c91dce7c1c9e42d4df20f5db0ff4 |