Variable messageSchemaConst

messageSchema: ZodObject<{
    content: ZodNullable<ZodString>;
    flags: ZodOptional<ZodUnion<[ZodArray<ZodString, "many">, ZodNull]>>;
    function_call: ZodOptional<ZodObject<{
        arguments: ZodRecord<ZodString, ZodAny>;
        name: ZodString;
    }, "strip", ZodTypeAny, {
        arguments: Record<string, any>;
        name: string;
    }, {
        arguments: Record<string, any>;
        name: string;
    }>>;
    id: ZodOptional<ZodString>;
    model: ZodOptional<ZodString>;
    name: ZodOptional<ZodString>;
    role: ZodUnion<[ZodLiteral<"user">, ZodLiteral<"assistant">, ZodLiteral<"system">, ZodLiteral<"function">]>;
}, "strip", ZodTypeAny, {
    content: null | string;
    flags?: null | string[];
    function_call?: { name: string; arguments: Record<string, any>; };
    id?: string;
    model?: string;
    name?: string;
    role: "function" | "user" | "assistant" | "system";
}, {
    content: null | string;
    flags?: null | string[];
    function_call?: { name: string; arguments: Record<string, any>; };
    id?: string;
    model?: string;
    name?: string;
    role: "function" | "user" | "assistant" | "system";
}> = ...

A JSON schema for a Message instance.

Type declaration

  • content: ZodNullable<ZodString>
  • flags: ZodOptional<ZodUnion<[ZodArray<ZodString, "many">, ZodNull]>>
  • function_call: ZodOptional<ZodObject<{
        arguments: ZodRecord<ZodString, ZodAny>;
        name: ZodString;
    }, "strip", ZodTypeAny, {
        arguments: Record<string, any>;
        name: string;
    }, {
        arguments: Record<string, any>;
        name: string;
    }>>
  • id: ZodOptional<ZodString>
  • model: ZodOptional<ZodString>
  • name: ZodOptional<ZodString>
  • role: ZodUnion<[ZodLiteral<"user">, ZodLiteral<"assistant">, ZodLiteral<"system">, ZodLiteral<"function">]>

Type declaration

  • content: null | string
  • Optional flags?: null | string[]
  • Optional function_call?: { name: string; arguments: Record<string, any>; }
  • Optional id?: string
  • Optional model?: string
  • Optional name?: string
  • role: "function" | "user" | "assistant" | "system"

Type declaration

  • content: null | string
  • Optional flags?: null | string[]
  • Optional function_call?: { name: string; arguments: Record<string, any>; }
  • Optional id?: string
  • Optional model?: string
  • Optional name?: string
  • role: "function" | "user" | "assistant" | "system"

Generated using TypeDoc