Skip to content

OpenAI.ChatCompletionData

Andrew Lambert edited this page Jan 15, 2024 · 8 revisions

OpenAI.ChatCompletionData

Class Declaration

 Protected Class ChatCompletionData

Remarks

This class represents a sequence of zero or more chat messages, which provide the context for the AI in ChatCompletion requests.

Messages may be attributed to one of three entities: "user", "assistant", or "system". A chat conversation is typically, but not necessarily, initiated with the "system" providing guidance to the AI "assistant" as to how to respond to the "user".

 Dim chatlog As New OpenAI.ChatCompletionData
 chatlog.AddMessage("system", "You are a helpful assistant.")
 Dim reply As OpenAI.ChatCompletion = OpenAI.ChatCompletion.Create(chatlog, "user", "Who won the world series in 2020?")

Methods

Properties

Shared methods

See also

Clone this wiki locally