Find answers from the community

Updated 9 months ago

Gpt4p

At a glance

A community member encountered an error when trying to use the 'gpt-4o' model with their application. The error message indicates that the 'gpt-4o' model is not a valid OpenAI model name, and provides a list of valid model names. Another community member suggested updating the llama-index-llms-openai package as a potential solution, but there is no explicitly marked answer in the comments.

I was trying to test out the GPT-4o model with my application and i hit this error:

File "/usr/local/lib/python3.11/site-packages/llama_index/llms/openai/utils.py", line 198, in openai_modelname_to_contextsize
raise ValueError(
ValueError: Unknown model 'gpt-4o'. Please provide a valid OpenAI model name in: gpt-4, gpt-4-32k, gpt-4-1106-preview, gpt-4-0125-preview, gpt-4-turbo-preview, gpt-4-vision-preview, 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-0125, gpt-3.5-turbo-1106, 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, gpt-35-turbo-1106, gpt-35-turbo-0613, gpt-35-turbo-16k-0613


is llamaindex not supporting GPT-4o or is this a version error im encountering?
L
1 comment
Update
pip install -U llama-index-llms-openai
Add a reply
Sign up and join the conversation on Discord