Find answers from the community

s
F
Y
a
P
Updated last year

hi i am trying to build a chatbot using

hi, i am trying to build a chatbot using openai on azure. i am following these instructions: https://gpt-index.readthedocs.io/en/latest/examples/agent/openai_agent.html. i've replaced this line:

Plain Text
llm: OpenAI = OpenAI(temperature=0, model="gpt-3.5-turbo-0613"),


with this:

Plain Text
llm: AzureOpenAI = AzureOpenAI(engine="gpt-4", model="gpt-4", temperature=0.7, max_tokens=800, top_p=0.95, frequency_penalty=0, presence_penalty=0, stop=None),


but I am getting this error:

Plain Text
openai.error.InvalidRequestError: Unrecognized request argument supplied: functions


in this line:

Plain Text
ai_message = self._llm.chat(chat_history, functions=functions).message


does anything immediately jump out? am i able to simply switch the llm to use AzureOpenAI?
L
f
B
12 comments
does gpt-4 in azure support the function calling API yet? I actually have no idea lol
ahh probably not
i'll check with them...
looking at their repo, looks like they added functions yesterday... trying to find which version to use https://github.com/Azure/azure-rest-api-specs/tree/main/specification/cognitiveservices/data-plane/AzureOpenAI/inference
used 2023-07-01-preview but still getting same error unfortunately
seems like it's not really supported then right now πŸ€” Might have to wait for proper support or just use normal openai for now
@Logan M FYI Azure released functions yesterday. I am still getting the same error I was getting previously though. Haven't spent too much time troubleshooting ibut might be that Llama index has to make a few changes for it to work with Azure
Yea I can try to look into this πŸ‘
I'm getting the same error 😦
Looks like updating to llamaindex 0.7.13 and using the 2023-07-01-preview API Version works
yup! We just fixed this!
Add a reply
Sign up and join the conversation on Discord