Find answers from the community

Updated 3 months ago

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

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