llm

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTextByRow

func GetTextByRow(p pdf.Page) (pdf.Rows, error)

func ReadPdf

func ReadPdf(filePath string) (string, error)

Types

type DocumentQa

type DocumentQa struct {
	InputLlm          llms.Model
	InputLlmDocuments []schema.Document
	InputQuestion     string
	// contains filtered or unexported fields
}

func (*DocumentQa) Execute

func (task *DocumentQa) Execute(context context.Context) error

func (*DocumentQa) GetResult

func (task *DocumentQa) GetResult(name string) string

type Export

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

func NewExport

func NewExport() *Export

func (*Export) AddDevice

func (export *Export) AddDevice(deviceInfo string)

func (*Export) CreateModel

func (export *Export) CreateModel(file string) error

根据设备点表文件自动生成物模型

func (*Export) ExportTo

func (export *Export) ExportTo(deviceData plugin.DeviceData)

点位变化触发场景联动

func (*Export) Init

func (export *Export) Init() error

func (*Export) IsReady

func (export *Export) IsReady() bool

func (*Export) OnEvent

func (export *Export) OnEvent(eventCode string, key string, eventValue interface{}) error

继承Export OnEvent接口

type PdfReader

type PdfReader struct {
	File   string
	Result []schema.Document
}

func (*PdfReader) Execute

func (pdf *PdfReader) Execute(context context.Context) error

type Response

type Response struct {
	ModelKey string `json:"modelKey"`
	SlaveId  string `json:"slaveId"`
	BusId    string `json:"busId"`
}

type Task

type Task interface {
	Execute(context context.Context) error
}

Jump to

Keyboard shortcuts

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