Find answers from the community

Updated 9 months ago

LLM

Plain Text
documents = SimpleDirectoryReader(input_dir="India_States_UT").load_data()
        service_context = ServiceContext.from_defaults(embed_model=embed_model, chunk_size=chunk_size,chunk_overlap=chunk_overlap)
        index = VectorStoreIndex(documents=documents, service_context=service_context,show_progress=True)
        index.storage_context.persist(f"index_{chunk_size}_{chunk_overlap}")
Why is this asking me for API key of OpenAI? I am using an opensource embedding model.
W
k
3 comments
By default sevice context if no llm object is passed it goes to openai.


If you don't intend to use llm just set llm=None in your service_context.
I meant to ask why is an API call required? What's the purpose of I am just generating embeddings with an open-source model?
Add a reply
Sign up and join the conversation on Discord