schema

package
v0.28.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectRequiredFields

func CollectRequiredFields(properties map[string]*gollem.Parameter) []string

CollectRequiredFields returns a list of required property names in ascending name order. The order must not depend on Go map iteration: the result is emitted verbatim as the JSON Schema "required" array, and Anthropic matches the prompt cache on an exact byte prefix that starts with the tool definitions, so a reordered array invalidates every cache breakpoint.

func ConvertParameterToJSONSchema

func ConvertParameterToJSONSchema(param *gollem.Parameter) map[string]any

ConvertParameterToJSONSchema converts gollem.Parameter to JSON Schema map This is the base conversion without provider-specific modifications

func ConvertParameterToJSONString

func ConvertParameterToJSONString(param *gollem.Parameter) (string, error)

ConvertParameterToJSONString converts Parameter to a JSON Schema string This is used by Claude for embedding schema in system prompt

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL