reminix.adapters.llamaindex.from_chat_engine¶
- reminix.adapters.llamaindex.from_chat_engine(chat_engine, *, name, metadata=None)[source]¶
Create a Reminix Agent from a LlamaIndex ChatEngine.
ChatEngine maintains conversation history and is ideal for conversational RAG applications.
- Parameters:
- Return type:
- Returns:
A Reminix Agent that wraps the ChatEngine.
Example:
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader from reminix.adapters.llamaindex import from_chat_engine from reminix.runtime import serve # Load and index documents documents = SimpleDirectoryReader("data").load_data() index = VectorStoreIndex.from_documents(documents) # Create ChatEngine and wrap it chat_engine = index.as_chat_engine(chat_mode="condense_question") agent = from_chat_engine(chat_engine, name="docs-chat") serve(agent)