Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Request Error: Resource not found #23

Open
micuentadecasa opened this issue Apr 13, 2023 · 0 comments
Open

Invalid Request Error: Resource not found #23

micuentadecasa opened this issue Apr 13, 2023 · 0 comments

Comments

@micuentadecasa
Copy link

Hi,

I'm facing an issue, I'm able to use in Python the code from the Azure OpenAI sandbox, so my keys and rest of configuration is ok, but when I try to use your samples I got a Invalid Request Error: Resource not found,

this is the trace:

InvalidRequestError Traceback (most recent call last)
Cell In[121], line 3
1 max_response_tokens = 500
----> 3 response = send_message(messages, chatgpt_model_name, max_response_tokens)
4 messages.append({"role": "assistant", "content": response})
6 print_conversation(messages)

Cell In[117], line 4, in send_message(messages, model_name, max_response_tokens)
3 def send_message(messages, model_name, max_response_tokens=500):
----> 4 response = openai.ChatCompletion.create(
5 engine=chatgpt_model_name,
6 messages=messages,
7 temperature=0.5,
8 max_tokens=max_response_tokens,
9 top_p=0.9,
10 frequency_penalty=0,
11 presence_penalty=0,
12 )
13 return response['choices'][0]['message']['content']

File /opt/homebrew/lib/python3.10/site-packages/openai/api_resources/chat_completion.py:25, in ChatCompletion.create(cls, *args, **kwargs)
23 while True:
24 try:
---> 25 return super().create(*args, **kwargs)
...
684 rbody, rcode, resp.data, rheaders, stream_error=stream_error
685 )
686 return resp

InvalidRequestError: Resource not found

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant