Mastering LlamaIndex : Create, Save & Load Indexes, Customize LLMs, Prompts & Embeddings
If you're venturing into the domain of natural language processing, you're likely to come across an abundance of tools and libraries designed to assist you in understanding and generating human-like text. One such toolkit is LlamaIndex, a robust inde...
blog.futuresmart.ai4 min read
Hi That is nicely written guides. I have a question: For below codes;
from llama_index import VectorStoreIndex, SimpleDirectoryReader
#Load documents from a directory documents = SimpleDirectoryReader('book').load_data()
#Create an index from the documents index=VectorStoreIndex.from_documents(documents)
i have an exception thrown at this line:VectorStoreIndex.from_documents(..)
No API key found for OpenAI. Please set either the OPENAI_API_KEY environment variable or openai.api_key prior to initialization. API keys can be found or created at .....
I am just testing the indexing, and i am not using openai. Why was there an openai exception when the app is executing this line: VectorStoreIndex.from_documents(documents)?