Table of Contents

Class Conversation

Namespace
OpenAI.Chat
Assembly
OpenAI-DotNet.dll
public sealed class Conversation
Inheritance
Conversation
Inherited Members

Constructors

Conversation(List<Message>)

[JsonConstructor]
public Conversation(List<Message> messages)

Parameters

messages List<Message>

Properties

Messages

[JsonPropertyName("messages")]
public IReadOnlyList<Message> Messages { get; }

Property Value

IReadOnlyList<Message>

Methods

AppendMessage(Message)

Appends Message to the end of Messages.

public void AppendMessage(Message message)

Parameters

message Message

The message to add to the Conversation.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

implicit operator string(Conversation)

public static implicit operator string(Conversation conversation)

Parameters

conversation Conversation

Returns

string