langchain

package
v0.0.0-...-e2cee1a Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FaissIndex

type FaissIndex struct {
	Id      uuid.UUID `json:"id" yaml:"id"`
	Title   string    `json:"title,omitempty" yaml:"title,omitempty"`
	UtcTime time.Time `json:"-" yaml:"-"`
	Created int64     `json:"created" yaml:"created"`
	Sources []Source  `json:"sources" yaml:"sources"`
}

func NewFaissIndex

func NewFaissIndex(sources []Source) (index *FaissIndex, err error)

func (*FaissIndex) SaveYaml

func (index *FaissIndex) SaveYaml(fp string) (err error)

func (*FaissIndex) Uuid

func (index *FaissIndex) Uuid() string

type LangChain

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

Lang Chain Client

func NewLangChain

func NewLangChain(key, path string) (lc *LangChain, err error)

func (*LangChain) GetPath

func (lc *LangChain) GetPath() string

func (*LangChain) PyIndex

func (lc *LangChain) PyIndex(ctx context.Context, cf, prefix string) (err error)

func (*LangChain) PyQuery

func (lc *LangChain) PyQuery(ctx context.Context, prefix, query string) (ans string, err error)

type Source

type Source struct {
	Title  string `json:"title"  yaml:"title"`
	Type   string `json:"type"   yaml:"type"`
	Source string `json:"source" yaml:"source"`
	Size   int64  `json:"size,omitempty" yaml:"size,omitempty"`
}

Jump to

Keyboard shortcuts

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