Skip to main content
Module

x/bertml/mod.ts>Conversation

Use common pre-trained ML models in Deno!
Latest
class Conversation
import { Conversation } from "https://deno.land/x/bertml@v0.1.0-alpha2/mod.ts";

A structure for holding a conversation and its history.

Constructors

new
Conversation(
conversationManager: ConversationManager,
rid: number,
)

Properties

readonly
conversationManager: ConversationManager
readonly
history: readonly (readonly [string, string])[]

Gets the history of all messages sent and responses in this conversation's history.

readonly
rid

The resource id of the Uuid that references this conversation in native memory.

Methods

sendMessage(message: string): Promise<string>

Sends the given text to the model and retreives a response from the model.