Skip to content

Function: resolveStructure()

@providerprotocol/ai


@providerprotocol/ai / utils / resolveStructure

resolveStructure(structure): JSONSchema

Defined in: src/utils/zod.ts:210

Resolves a structure parameter that may be JSONSchema or Zod schema. Validates that the result is an object schema.

JSONSchema or Zod schema (must be object type)

JSONSchema | ZodLike

JSONSchema

Resolved JSONSchema

Error if schema is not an object type