structured

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnmarshalToStruct

func UnmarshalToStruct[T any](
	result EntityExtractorResult,
	out *T,
) error

Types

type EntityExtractor

type EntityExtractor struct {
	LlamaCppClient *llamacpp.LlamaCppClient
	MaxRetries     int
}

func (*EntityExtractor) ExtractFromString

func (self *EntityExtractor) ExtractFromString(
	responseChannel chan EntityExtractorResult,
	jsonSchema any,
	userInput string,
)

type EntityExtractorResult

type EntityExtractorResult struct {
	Content string
	Error   error
	Entity  any
}

type EntityJsonSchemaValidator

type EntityJsonSchemaValidator struct {
	CompiledJsonSchema  *jsonschema.Schema
	MarshaledJsonSchema []byte
}

type EntityJsonSchemaValidatorBuilder

type EntityJsonSchemaValidatorBuilder struct {
}

func (*EntityJsonSchemaValidatorBuilder) BuildEntityJsonSchemaValidator

func (self *EntityJsonSchemaValidatorBuilder) BuildEntityJsonSchemaValidator(
	jsonSchema any,
) (*EntityJsonSchemaValidator, error)

Jump to

Keyboard shortcuts

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