-1

I have a tts Python program that interprets speech-to-text data, and after that it asks this prompt to the GPT davinci-003 API and answers back, but I just switched to GPT 3.5 turbo, and it doesn't work because of the Invalid URL (POST /v1/chat/completions) error.

I tried checking the model endpoint compatibility web page and also tried asking GPT-3 and GPT-4. I didn’t get any answer.

I checked Reddit as well, but I didn’t find anything. Also, I checked Stack Overflow, but I didn’t find anything either.

This is the API endpoint URL or at least the one I tried.

Enter image description here

My current GPT-3.5 turbo engine code:

Enter image description here

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Ege
  • 11
  • 1
  • 3
    [Please do not upload images of code/data/errors.](//meta.stackoverflow.com/q/285551) – eten Apr 13 '23 at 05:27
  • Please review *[Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/)* (e.g., *"Images should only be used to illustrate problems that* ***can't be made clear in any other way,*** *such as to provide screenshots of a user interface."*) and [do the right thing](https://stackoverflow.com/posts/76001873/edit). Thanks in advance. – Peter Mortensen Apr 16 '23 at 11:17

1 Answers1

0

Using engines is deprecated. Use model instead.

response = openai.ChatCompletion.create(
    model="gpt-3.5-turbo",
    messages=messages,
    max_tokens=1000,
    n=1,
    temperature=0.3,
)
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
eten
  • 803
  • 3
  • 14