Skip to content

Type Alias: AiOutput ​

ts
type AiOutput = 
  | {
  type: "text";
}
  | {
  description?: string;
  name?: string;
  schema: AiSchema;
  type: "object";
}
  | {
  description?: string;
  element: AiSchema;
  maxItems?: number;
  minItems?: number;
  name?: string;
  type: "array";
}
  | {
  description?: string;
  name?: string;
  options: string[];
  type: "choice";
}
  | {
  description?: string;
  name?: string;
  type: "json";
};

How the answer is shaped: text, an object or an array of a schema, one of the options, any JSON.

Released under the Apache-2.0 License.