Find answers from the community

Updated 2 months ago

Azure OpenAI gpt-4o-mini support unknown model

Hi

Any word on Azure OpenAI gpt-4o-mini support?

"Unknown model 'gpt-4o-mini'. 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-1106-vision-preview, gpt-4-turbo-2024-04-09, gpt-4-turbo, gpt-4o, gpt-4o-2024-05-13, 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
H
n
16 comments
Its already supported

pip install -U llama-index-llms-openai
thats openai, not azure open ai right?
ive tried that and it still doesnt recognise
The utils are in openai
azure extends it
(ignore the broken cicd, its unrelated to this change)

https://github.com/run-llama/llama_index/pull/16335
it like, just published, you should have llama-index-llms-openai==0.2.10 for it to work
hey @Logan M in my code, i was using llamaindex verion 0.9.21 for automerging retriever implementation. after i installed lama-index-llms-openai, getting this error:

Traceback (most recent call last):
File "/home/prakhar/Downloads/doc-retrieve-and-summarize1/app.py", line 6, in <module>
from llama_index.core import Document
.....
.....
from llama_index.core import BaseQueryEngine
ImportError: cannot import name 'BaseQueryEngine' from 'llama_index.core' (/home/prakhar/Downloads/doc-retrieve-and-summarize1/venv/lib/python3.10/site-packages/llama_index/core/init.py)
@nvm with such an old version, I'm not sure. I'd have to go back to that tag on the repo and find the proper import
i just upgraded llamaindex to v0.11.something and shifted my code to this latest version but now i'm getting error --> ImportError: cannot import name 'Document' from 'llama_index.core' (unknown location)
do we not have Document method now??
We do, but upgrading from v0.9.x can be messy
Use a fresh venv
yes, did the same just now
hey @Logan M i'm simply using this line in my code -->

from llama_index.llms.openai import OpenAI
llm_gpt = OpenAI(model="gpt-4o-mini")

error i'm getting:

pydantic_core._pydantic_core.ValidationError: 2 validation errors for OpenAI
logprobs
Field required [type=missing, input_value={'model': 'gpt-4o-mini', ..., 'output_parser': None}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.9/v/missing
default_headers
Input should be a valid dictionary [type=dict_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.9/v/dict_type
I'm not sure what your issue is. A fresh venv works for me πŸ€” if you can replicate in Google colab, happy to look further
Add a reply
Sign up and join the conversation on Discord