source

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const OptionGenMaxTokens = 3000

Variables

This section is empty.

Functions

func ErrColumnNameOrIdEmpty

func ErrColumnNameOrIdEmpty() error

func ErrColumnNotFound

func ErrColumnNotFound(input string) error

func ErrTableNameOrIdEmpty

func ErrTableNameOrIdEmpty() error

func ErrTableNotFound

func ErrTableNotFound(input string) error

func GetLinkedCellValue

func GetLinkedCellValue(ctx context.Context, db *ent.Client, column *ent.TableColumn, linkedRow string) (*schema.CellValue, error)

Types

type AISource

type AISource struct {
	Type    string   `json:"type"`
	Prompt  string   `json:"prompt"`
	Options []string `json:"options"`
	// contains filtered or unexported fields
}

func (*AISource) Init

func (as *AISource) Init(ctx context.Context, ai ai.AiService, column *ent.TableColumn) error

func (*AISource) Next

func (as *AISource) Next(ctx context.Context) (*schema.CellValue, error)

type InvalidSource

type InvalidSource struct {
	// contains filtered or unexported fields
}

func (*InvalidSource) Error

func (e *InvalidSource) Error() string

type LinkedSource

type LinkedSource struct {
	Type string `json:"type"`

	Table          string   `json:"table"`
	Column         string   `json:"column"`
	ContextColumns []string `json:"context_columns"`
	// contains filtered or unexported fields
}

func (*LinkedSource) Init

func (ls *LinkedSource) Init(ctx context.Context, db *ent.Client, column *ent.TableColumn) error

func (*LinkedSource) Next

func (ls *LinkedSource) Next(ctx context.Context) (*schema.CellValue, error)

type ListSource

type ListSource struct {
	Type    string   `json:"type"`
	Options []string `json:"options"`
	// contains filtered or unexported fields
}

func (*ListSource) Init

func (ls *ListSource) Init(ctx context.Context) error

func (*ListSource) Next

func (ls *ListSource) Next(ctx context.Context) (*schema.CellValue, error)

type Source

type Source interface {
	Next(ctx context.Context) (*schema.CellValue, error)
}

func ValidateSource

func ValidateSource(ctx context.Context, raw json.RawMessage, db *ent.Client) (Source, error)

Jump to

Keyboard shortcuts

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