Find answers from the community

Updated 3 months ago

Thanks but I don t understand how and

Thanks, but I don't understand how and what to use here. When I call from_documents, inside it calls the OpenAI() instance where the openai key could be passed to but I don't see any way to do it. Maybe it can be done via customization?
d
S
2 comments
Sorry for abbreviations,

you can choose llm to use using the service_context as argument for from_document method (https://gpt-index.readthedocs.io/en/latest/reference/service_context.html)

just like
GPTSimpleVectorIndex.from_documents(
city_docs[wiki_title], service_context=service_context
)
Add a reply
Sign up and join the conversation on Discord