livekit-plugins-llama-index


Namelivekit-plugins-llama-index JSON
Version 0.2.3 PyPI version JSON
download
home_pagehttps://github.com/livekit/agents
SummaryLlama Index plugin for LiveKit Agents
upload_time2025-03-06 17:22:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.0
licenseApache-2.0
keywords webrtc realtime audio video livekit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LiveKit Plugins Llama Index

Agent Framework plugin for using Llama Index. Currently supports [Query Engine](https://docs.llamaindex.ai/en/stable/module_guides/deploying/query_engine/) and [Chat Engine](https://docs.llamaindex.ai/en/stable/module_guides/deploying/chat_engines/).

## Install

```bash
pip install livekit-plugins-llama-index
```

## Query Engine

Query Engine is primarily used for RAG. See [example voice agent](https://github.com/livekit/agents/blob/main/examples/voice-pipeline-agent/llamaindex-rag/query_engine.py)

## Chat Engine

Chat Engine can be used as an LLM within the framework.

```python
# 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](https://github.com/livekit/agents/blob/main/examples/voice-pipeline-agent/llamaindex-rag/chat_engine.py)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/livekit/agents",
    "name": "livekit-plugins-llama-index",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": null,
    "keywords": "webrtc, realtime, audio, video, livekit",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/34/3d/b2c15a4160f6ab2994a8264e227dddc76cb7bf3598a0978523e9d61f11e5/livekit_plugins_llama_index-0.2.3.tar.gz",
    "platform": null,
    "description": "# LiveKit Plugins Llama Index\n\nAgent Framework plugin for using Llama Index. Currently supports [Query Engine](https://docs.llamaindex.ai/en/stable/module_guides/deploying/query_engine/) and [Chat Engine](https://docs.llamaindex.ai/en/stable/module_guides/deploying/chat_engines/).\n\n## Install\n\n```bash\npip install livekit-plugins-llama-index\n```\n\n## Query Engine\n\nQuery Engine is primarily used for RAG. See [example voice agent](https://github.com/livekit/agents/blob/main/examples/voice-pipeline-agent/llamaindex-rag/query_engine.py)\n\n## Chat Engine\n\nChat Engine can be used as an LLM within the framework.\n\n```python\n# load the existing index\nstorage_context = StorageContext.from_defaults(persist_dir=<mydir>)\nindex = load_index_from_storage(storage_context)\n\nasync def entrypoint(ctx: JobContext):\n    ...\n    chat_engine = index.as_chat_engine(chat_mode=ChatMode.CONTEXT)\n    assistant = VoicePipelineAgent(\n        vad=silero.VAD.load(),\n        stt=deepgram.STT(),\n        llm=llama_index.LLM(chat_engine=chat_engine),\n        tts=openai.TTS(),\n        chat_ctx=initial_ctx,\n    )\n```\n\nfull example [here](https://github.com/livekit/agents/blob/main/examples/voice-pipeline-agent/llamaindex-rag/chat_engine.py)\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Llama Index plugin for LiveKit Agents",
    "version": "0.2.3",
    "project_urls": {
        "Documentation": "https://docs.livekit.io",
        "Homepage": "https://github.com/livekit/agents",
        "Source": "https://github.com/livekit/agents",
        "Website": "https://livekit.io/"
    },
    "split_keywords": [
        "webrtc",
        " realtime",
        " audio",
        " video",
        " livekit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa7be3b8df5a5e4aa2d8451a4f415c6796c2c91dce7c1c9e42d4df20f5db0ff4",
                "md5": "22e2cd92285718bc03cfd383c8ce2e9f",
                "sha256": "d808034772af7d3e4342d23dc0746d63ada1ef1351ae170607dc8cb0b369b354"
            },
            "downloads": -1,
            "filename": "livekit_plugins_llama_index-0.2.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "22e2cd92285718bc03cfd383c8ce2e9f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0",
            "size": 4931,
            "upload_time": "2025-03-06T17:22:00",
            "upload_time_iso_8601": "2025-03-06T17:22:00.679355Z",
            "url": "https://files.pythonhosted.org/packages/aa/7b/e3b8df5a5e4aa2d8451a4f415c6796c2c91dce7c1c9e42d4df20f5db0ff4/livekit_plugins_llama_index-0.2.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "343db2c15a4160f6ab2994a8264e227dddc76cb7bf3598a0978523e9d61f11e5",
                "md5": "139542c1f0aefb81d65d55c852d522d9",
                "sha256": "ba5587c9a037f4ab9043b3b683b4bfe70c368f96ca8d782b85614503a385dbaf"
            },
            "downloads": -1,
            "filename": "livekit_plugins_llama_index-0.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "139542c1f0aefb81d65d55c852d522d9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 4153,
            "upload_time": "2025-03-06T17:22:26",
            "upload_time_iso_8601": "2025-03-06T17:22:26.851091Z",
            "url": "https://files.pythonhosted.org/packages/34/3d/b2c15a4160f6ab2994a8264e227dddc76cb7bf3598a0978523e9d61f11e5/livekit_plugins_llama_index-0.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-03-06 17:22:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "livekit",
    "github_project": "agents",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "livekit-plugins-llama-index"
}
        
Elapsed time: 0.44620s