@hanzo/ui

Directive

import { TOOLS, EMPTY, stage, read, answer, made } from '@hanzo/ui/chat'

No examples yet.

Types

export type Directive =
export type Facts = Record<string, unknown>
export interface Report {
  summary: string
  inputs?: Facts
  outputs?: Facts
}
export type Tool = {
  name: string
  description: string
  input_schema: {
    type: 'object'
    properties: Record<string, unknown>
    required?: string[]
  }
}
export interface Frame {
  type: string
  /** Which content block, on the three events that name one. */
  index?: number
  /** `content_block_start`'s block. */
  content_block?: unknown
  /** `content_block_delta`'s delta. */
  delta?: unknown
}
export interface Stage {
  /** What the persona is doing — the mood to draw. */
  emotion: Emotion
  /** The mood a `feel` directive fixed. While set, the stream does not move the
   *  persona; the model's word outranks the reading. */
  held?: Emotion
  /** The turn, as parts. Directives that draw produce one; the rest do not. */
  parts: readonly MessagePart[]
  /** The side panel's content, once `report` has landed. */
  report?: Report
  /** Every directive this turn, in order. `ran.map(answer)` is the reply. */
  ran: readonly Directive[]
  /** Tool blocks still arriving, by index. */
  open: Readonly<Record<number, Call>>
}

Exports

TOOLSEMPTYstagereadanswermadetype Directivetype Factstype Frametype Reporttype Stagetype Tool