Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_llama_index-0.2.4.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

livekit_plugins_llama_index-0.2.4-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_llama_index-0.2.4.tar.gz.

File metadata

File hashes

Hashes for livekit_plugins_llama_index-0.2.4.tar.gz
Algorithm Hash digest
SHA256 0cd8eaeea0568bc7e3741efb2419851e3dcfdc10ab4227d01a437f8b23b0bfc5
MD5 e7f51091ed7d59ea9e03cbfc1e6b7ea6
BLAKE2b-256 dd3707d9fa9a1847fd7536b0163f2c59acbaa55878c4a4931712f4020cdc44c3

See more details on using hashes here.

File details

Details for the file livekit_plugins_llama_index-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_llama_index-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fc51196098989f785524b751c06c8ed4f597312668ce656a99fe2ed8099430ac
MD5 b3a832fff93db695d634885790150ef3
BLAKE2b-256 2d7e10b5d6fdaec4a8f3f2704fce496e6857ce1a8fe3c7848bff6f2e34ad28b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page