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

    Function ai

    • An AI function: its name, what it does, its input and output fields; a language model writes the body. ai("mood", { description, input: { review: t.string() }, output: t.enum("happy", "unhappy") }).

      Type Parameters

      • I extends Fields
      • O extends Fields | undefined = undefined
      • A extends FieldSpec | undefined = undefined

      Parameters

      Returns AIFunction<
          {
              [K in string
              | number
              | symbol]: (
                  { [K in string
                  | number
                  | symbol]: InputValueOf<I[K]> } & {
                      [K in string | number | symbol]?: InputValueOf<I[K]>
                  }
              )[K]
          },
          Outputs<O, A>,
          Answer<O, A>,
      >