@threadplane/chatFunctionv0.3.4

deriveJsonSchema

Convert a Standard Schema to a JSON Schema for the model's parameters. Uses Zod's converter; throws a clear error for non-Zod validators (callers should supply a Zod schema — see the client-tools docs).

import { deriveJsonSchema } from '@threadplane/chat';

Declaration · overload 1

export declare function deriveJsonSchema(toolName: string, schema: StandardSchemaV1): Record<string, unknown>;

Parameters

toolName · required
string
schema · required
StandardSchemaV1

Returns

Record<string, unknown>