Skip to content

chatbot/graph

This page is auto-generated from TSDoc output. Edit the source file, not this Markdown.

  • Package: @leipzigtreechat/chatbot
  • Source file: packages/chatbot/src/graph.ts

Builds the chatbot state graph with the package’s standard node wiring.

function ChatBotGraph(printMessage: (message: BaseMessage) => Promise<void>, getUserInput: () => Promise<string>, onMetadata: ChatBotMetadataCallback): void

Builds the chatbot state graph with the package’s standard node wiring.

Parameters

  • printMessage ((message: BaseMessage) => Promise): Called whenever the graph produces an assistant message for the user.
  • getUserInput (() => Promise): Resolves the next user input whenever the graph waits for input.
  • onMetadata (ChatBotMetadataCallback): Optional observer for progress and error metadata emitted by the nodes. Defined at: line 22