Zack Saadioui
8/26/2024
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex from llama_index.llms.openai import OpenAI from llama_index.agent import LLMCompiler # Initialize LLM llm = OpenAI(model="gpt-4") # Load documents documents = SimpleDirectoryReader('./data').load_data() # Create an index index = VectorStoreIndex.from_documents(documents) # Build an agent using LLM Compiler agent = LLMCompiler.from_index(index, llm=llm)
1
2
bash
llama-agents monitor --control-plane-url http://127.0.0.1:8000
1
2
bash
pip install llama-agents llama-index-agent-openai
Copyright © Arsturn 2024