db

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dbFile string) (conn *sql.DB, schema string, err error)

Types

type Character added in v0.5.0

type Character struct {
	ID uint `gorm:"primaryKey"`
	// SessionID uint `gorm:"not null"`
	Result string `gorm:"not null"`
}

type Prompt

type Prompt struct {
	// IDs
	ID        uint   `gorm:"primaryKey"`
	SessionID string `gorm:"not null;index:session"`

	// Content
	Agent      string `gorm:"not null"`
	State      string `gorm:"not null"`
	System     string `gorm:"not null"`
	HistoryLen int    `gorm:"not null"`
	Request    string `gorm:"not null"`
	Provider   string `gorm:"not null"`
	Model      string `gorm:"not null"`
	Response   string

	// Time
	CreatedAt   time.Time `gorm:"not null"`
	MachTimeSum int       `gorm:"not null"`
	MachTime    string    `gorm:"not null"`
}

Prompt represents a prompt record in the database.

type Resource added in v0.5.0

type Resource struct {
	ID uint `gorm:"primaryKey"`
	// SessionID uint `gorm:"not null"`
	Key   string `gorm:"not null"`
	Value string `gorm:"not null"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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