Skip to content

OpenAI.ChatCompletion.Create

Andrew Lambert edited this page Mar 6, 2023 · 1 revision

Method signatures

 Shared Function Create(Request As OpenAI.Request) As OpenAI.ChatCompletion
 Shared Function Create(Optional ChatLog As OpenAI.ChatCompletionData, Role As String, Content As String, Model As OpenAI.Model = Nil) As OpenAI.ChatCompletion

Parameters

Create(OpenAI.Request)

Name Type Comment
Request Request An OpenAI request object.

Create(OpenAI.ChatCompletionData, String, String, OpenAI.Model)

Name Type Comment
ChatLog ChatCompletionData Optional. The chat conversation so far.
Role String One of "user", "assistant", or "system", identifying the speaker of the message.
Content String The message that the speaker is sending to the chat.
Model Model Optional. An AI model to use for the request. If not specified then gpt-3.5-turbo is used.

Return value

Returns a new instance of OpenAI.ChatCompletion containing the response to the query.

Clone this wiki locally