API reference · Kjarni 0.2.7

Struct ChatTurn

Namespace: Kjarni
Assembly: Kjarni.dll

One turn of a conversation, for callers that own the transcript themselves.

public readonly struct ChatTurn

Constructors

ChatTurn(ChatTurnRole, string)

Creates a turn.

public ChatTurn(ChatTurnRole role, string content)

Parameters

role ChatTurnRole

content string

Properties

Content

The turn's text.

public string Content { get; }

Property Value

string

Role

Who produced this turn.

public ChatTurnRole Role { get; }

Property Value

ChatTurnRole

Methods

Assistant(string)

Creates an assistant turn.

public static ChatTurn Assistant(string content)

Parameters

content string

Returns

ChatTurn

System(string)

Creates a system turn.

public static ChatTurn System(string content)

Parameters

content string

Returns

ChatTurn

User(string)

Creates a user turn.

public static ChatTurn User(string content)

Parameters

content string

Returns

ChatTurn

Kjarni runs the same engine on every platform: