Find answers from the community

Updated 4 months ago

I am trying to use LlamaIndex to find

At a glance
I am trying to use LlamaIndex to find the ideal chunk size for my data. I try setting the llm to "gpt-4-1106-preview" but when I try and run the code it tells me that model is not a valid model name. I have searched but I'm not sure what is going on. All of my dependencies are using the latest versions, including llama-index and openai.
W
t
S
8 comments
I can see the model present in the code: https://github.com/run-llama/llama_index/blob/9f4e27563ceab6f469ca68e381563ade3558ebc5/llama_index/llms/openai_utils.py#L38

What is the llama-index version that you are trying with?
can we see the sample of code where you create the
from llama_index.llms import OpenAI instance ?

Should be something like this:
Plain Text
OpenAI(model="gpt-4-1106-preview")
That's exactly what I have, maybe my version of llama-index is not really the latest?
Plain Text
gpt4 = OpenAI(temperature=0, model="gpt-4-1106-preview")
Plain Text
ValueError: Unknown model 'gpt-4-1106-preview'. Please provide a valid OpenAI model name in: gpt-4, gpt-4-32k, gpt-4-0613, gpt-4-32k-0613, gpt-4-0314, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-16k, gpt-3.5-turbo-0613, gpt-3.5-turbo-16k-0613, gpt-3.5-turbo-0301, text-davinci-003, text-davinci-002, gpt-3.5-turbo-instruct, text-ada-001, text-babbage-001, text-curie-001, ada, babbage, curie, davinci, gpt-35-turbo-16k, gpt-35-turbo
Yes, you'll have to upgrade, as there no model related to gpt4 vision as well
Yep that was it, I was updating openai in the wrong place! I am new to python and conda, but I got it figured out, thanks for the help.
Add a reply
Sign up and join the conversation on Discord