Skip to content

chatbot/metadata

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

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

Progress states emitted while the chatbot graph processes a request.

type ChatBotMetadataStatus = | "WAITING_FOR_INPUT"
| "REWRITING_QUESTION"
| "GATHERING_DATA"
| "GENERATING_CLARIFICATION"
| "GENERATING_RESPONSE"
| "ERROR"

Progress states emitted while the chatbot graph processes a request.

Defined at: line 6

type ChatBotMetadataEvent = {
/**
* Current processing step within the chatbot pipeline.
*/
status: ChatBotMetadataStatus;
/**
* Optional user-facing detail for the current step, mainly used for errors.
*/
message?: string;
}

Metadata event forwarded to UI integrations so they can reflect chatbot progress.

Defined at: line 17

type ChatBotMetadataCallback = (event: ChatBotMetadataEvent) => Promise<void> | void

Callback invoked whenever the chatbot emits a metadata event.

Defined at: line 31

const CHATBOT_METADATA_MESSAGES: ReadonlyRecord<ChatBotMetadataStatus, string>

Default user-facing messages for each metadata status.

Defined at: line 36