eino

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type History

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

func NewEinoHistory

func NewEinoHistory(dsn string) *History

NewEinoHistory 使用 DSN 创建 History 实例 DSN 格式: - MySQL: user:pass@tcp(host:port)/dbname?charset=utf8mb4&parseTime=True&loc=Local - SQLite: /path/to/file.db 或 /path/to/file.db?_journal_mode=WAL

func (*History) GetHistory

func (x *History) GetHistory(convID string, limit int) (list []*schema.Message, err error)

GetHistory 根据convID获取聊天历史

func (*History) SaveMessage

func (x *History) SaveMessage(mess *schema.Message, convID string) error

SaveMessage 存储message

Jump to

Keyboard shortcuts

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