Skip to content
1 min read · 224 words

Interface: JsonSchema

Defined in: batteries/llm/chat_common/types.ts:69

The subset of JSON Schema that Chat-family tool/function parameters accept, as emitted by ChatHelpersCommon.descriptionToChatCompletionsJsonSchema. The index signature allows extra keywords to pass through to the wire.

Indexable

ts
[key: string]: unknown

Pass-through for any other JSON Schema keyword.

Properties

PropertyTypeDescriptionDefined in
additionalProperties?boolean | JsonSchemaWhether (or what schema) additional, undeclared properties are permitted.batteries/llm/chat_common/types.ts:87
default?unknownDefault value for the node.batteries/llm/chat_common/types.ts:77
description?stringHuman-readable description of the schema node.batteries/llm/chat_common/types.ts:73
enum?unknown[]Permitted values for the node.batteries/llm/chat_common/types.ts:75
examples?unknown[]Example values for the node.batteries/llm/chat_common/types.ts:79
items?JsonSchema | JsonSchema[]Element schema(s) for array types.batteries/llm/chat_common/types.ts:85
properties?Record<string, JsonSchema>Property schemas keyed by property name (for object types).batteries/llm/chat_common/types.ts:81
required?string[]Names of required properties (for object types).batteries/llm/chat_common/types.ts:83
type?"string" | "number" | "boolean" | "object" | "array" | "integer" | "null"JSON Schema primitive/compound type.batteries/llm/chat_common/types.ts:71