Find answers from the community

Updated 6 months ago

@Logan M How to use GPT4-0 in open ai

At a glance

The community member is trying to use the GPT4-0 model in the OpenAI library, but is receiving an error stating that the model name "gpt-4o" is unknown. The error message provides a list of valid OpenAI model names that can be used.

In the comments, another community member suggests using the llama-index-llms-openai package to install the necessary dependencies. They also ask whether the community member should use the OpenAIMultiModal class or the regular OpenAI class from the llama_index library. The response indicates that either option can be used, but the OpenAIMultiModal class is only necessary if the community member is planning to do multi-modal tasks.

There is no explicitly marked answer in the comments.

How to use GPT4-0 in open ai model,
when i use this -> Settings.llm = OpenAI(model="gpt-4o")
i get this error
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-turbo-2024-04-09, gpt-4-turbo, 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-0125, gpt-35-turbo-1106, gpt-35-turbo-0613, gpt-35-turbo-16k-0613
L
n
3 comments
pip install -U llama-index-llms-openai
@Logan M shoul di use this open ai multi model package for gpt-40?
from llama_index.multi_modal_llms.openai import OpenAIMultiModal

openai_mm_llm = OpenAIMultiModal(
model="gpt-4-vision-preview",
api_key=OPENAI_API_KEY,
max_new_tokens=500,
temperature=0.0,
)
or the regular open ai package from llama_index.llms.openai import OpenAI?
you can use either or. The latter is only if you are planning on doing multi-modal stuff
Add a reply
Sign up and join the conversation on Discord