Closed singhk97 closed 12 months ago
This looks good to me -- I like the idea of focusing towards chat completion. In the changes I'm currently making, instead of parsing the model name, I added an option to indicate completion type:
(Please ignore the class naming -- that is temporary)
So, combining with what is above, this is what I'm thinking
completionType
as chat
(default) or completion
(text)The benefit is that no model name parsing will need to be done - instead it is up to the user to 'opt in' to text completion. It will also be forward thinking like @singhk97's proposal where we're preparing for text completion to go away.
Thoughts? @singhk97 @aacebo
This looks good to me -- I like the idea of focusing towards chat completion. In the changes I'm currently making, instead of parsing the model name, I added an option to indicate completion type:
(Please ignore the class naming -- that is temporary)
So, combining with what is above, this is what I'm thinking
- Add an option when creating the planner to indicate
completionType
aschat
(default) orcompletion
(text)- Continue to take model name (needed for OpenAI API calls)
For Azure OpenAI, require deployment name param (required for API calls) instead of the model name param
- Add inline documentation so that customers know model name and deployment name are separate
- Update samples to use chat completion
The benefit is that no model name parsing will need to be done - instead it is up to the user to 'opt in' to text completion. It will also be forward thinking like @singhk97's proposal where we're preparing for text completion to go away.
Thoughts? @singhk97 @aacebo
I agree, but we might want to tweak the naming since a chat
in openai is a completion
still. The change they made was Completion
=> Chat Completion
, so this may confuse devs.
might consider 'chat' | 'text'
Agreed @aacebo
I like the idea @corinagum. If there is an option to specify the completions api to use, then we won't need the AOAI model name anymore. In that case we should just keep one property to capture model name and deployment name.
Here's a thought, what if we changed the modelName
to deploymentName
property. AOAI customers won't be confused because the name matches what they should provide. And we can add a comment for OpenAI customers to supply the model name. Or having it the other way around also works for me as well.
With Steve's breaking changes merged in, I think we can mark this as closed. Priority has been placed on chat completion over text completion, and further AI work for C# is being done by Qianhao.
Abstract
OpenAI has publicly stated they are moving away from the Completions API and will not be developing it any further. It has been replaced by Chat Completions API, which was released in March 2023. It reportedly accounts for 97% of the API usage.
Overview
As of July 6 2023, OpenAI has rendered the aCompletion API legacy API. The API only supports are
text-davinci-003
models or older. To utilizegpt-3.5-turbo
orgpt-4
, you must use the Chat Completion API. Here's the blog post: https://openai.com/blog/gpt-4-api-general-availability.You can only use the
text-davinci-003
model with the Completions API. And thegpt-
models only with the Chat Completions API. This applies to both OpenAI and Azure OpenAI.Essentially, the Chat Completions API is a structured interface built upon the Completions API. This implies that you can use the Chat Completions API to function similarly, by omitting conversation history.
Proposal
gpt-3.5-turbo
, and move away fromtext-davinci-003
.Chat Completions API
as the default completion api, and useCompletions API
only if the model is prefixed withtext-
.text-
will not be usable. We can eventually add support forbabbage-002
anddavinci-002
if the users would like so.