functai for TypeScript - v0.1.0
    Preparing search index...

    Function tool

    • A tool the model may call: your function, with a name, a sentence and its input's types. tool("lookup_order", { description, input: { order: t.string() } }, ({ order }) => …); order is typed from its shape.

      Type Parameters

      Parameters

      • name: string
      • spec: { description?: string; effects?: Effects | null; input: I }
      • run: (input: { [K in string | number | symbol]: ValueOf<I[K]> }) => unknown

      Returns Tool