schema

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONSchema

func JSONSchema(t reflect.Type) *jsonschema.Schema

JSONSchema return the json schema of the configuration

func ToFunctionSchema

func ToFunctionSchema(tType reflect.Type, tSchema *jsonschema.Schema) []llms.FunctionDefinition

Types

type Faker

type Faker interface {
	Fake() any
}

Faker is a interface for generating structures with fake data. It is used for generating test data.

type Schema

type Schema struct {
	*jsonschema.Schema
	String string

	Functions []llms.FunctionDefinition
}

func New

func New(t reflect.Type) (*Schema, error)

New creates a new schema from the given type

func (*Schema) NameFromRef

func (s *Schema) NameFromRef() string

Jump to

Keyboard shortcuts

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