outputparserx

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ParseError

type ParseError struct {
	Text   string
	Reason string
}

ParseError is the error type returned by output parsers.

func (ParseError) Error

func (e ParseError) Error() string

type ResponseSchema

type ResponseSchema struct {
	Name        string
	Description string
	Types       string
	Require     bool // 是否必选
	Schemas     []ResponseSchema
}

type Structured

type Structured struct {
	outputparser.Structured
	// contains filtered or unexported fields
}

func NewStructured

func NewStructured(schema []ResponseSchema) Structured

func (Structured) GetFormatInstructions

func (p Structured) GetFormatInstructions() string

func (Structured) Parse

func (p Structured) Parse(text string) (any, error)

Jump to

Keyboard shortcuts

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