Find answers from the community

Updated 2 years ago

Hi does GPTSimpleVectorIndex support

Hi, does GPTSimpleVectorIndex support changing of the LLM predictor? I checked my usage and it is still falling back to text-davinci-03. here's the gist of the code.

# define LLM llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="gpt-3.5-turbo", max_tokens=512)) service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, prompt_helper=prompt_helper) index = GPTSimpleVectorIndex.from_documents( documents, service_context=service_context )
L
d
4 comments
Side note, make sure you pass the service context back in. Otherwise, this looks correct
what do you mean by pass back in? is it in index.query()?
Oh sorry, typo in there.

I meant pass it back in when you do load_from_disk
oh i see. let me do that as well. thanks man. i also changed to ChatOpenAI as suggested to avoid deprecation warnings.
Add a reply
Sign up and join the conversation on Discord