schemajson

package
v0.13.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package schemajson renders genai's typed Schema as JSON Schema, for the dialects whose servers take JSON Schema (openai-chat and openai-responses). One copy, so the two cannot disagree about what a tool's arguments look like on the wire.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromGenai

func FromGenai(s *genai.Schema) map[string]any

FromGenai renders genai's typed Schema as a JSON Schema object. genai spells types in upper case ("OBJECT") and nullability as a flag; JSON Schema wants "object" and a type list. Everything else maps field to field.

Types

This section is empty.

Jump to

Keyboard shortcuts

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