srcnalt / OpenAI-Unity

An unofficial OpenAI Unity Package that aims to help you use OpenAI API directly in Unity Game engine.
MIT License
672 stars 150 forks source link

Accessing different models #35

Closed Radlad-io closed 1 year ago

Radlad-io commented 1 year ago

Thank you for all of your hard work on this and for making it available.

I'm trying to change the model per OpenAI documentation. Accessing GPT 3.5 models works just fine.

var completionResponse = await openai.CreateChatCompletion(new CreateChatCompletionRequest()
      {
          Model = "gpt-3.5-turbo-0301",
          Messages = messages
      });

But if I try to pass other models, particularly GPT 3 modes, to the constructor:

Model = "gpt-3-turbo-0301" Model = "gpt-3-text-ada-001" Model = "gpt-3.0-turbo-0301"

It return the following error message.

Error Message: The model gpt-3-text-ada-001 does not exist

Does this only support GPT-3.5 ?

srcnalt commented 1 year ago

Hi @Radlad-io thank you, there are two different endpoints in this case Chat Completion and Text Completion.

In case of chat completion you can use gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301 As for text completion you can use text-davinci-003, text-davinci-002, text-curie-001, text-babbage-001, text-ada-001

All possible models are listed here: https://platform.openai.com/docs/models/model-endpoint-compatibility