session

package
v0.0.0-...-f53fc3a Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InspectSession

func InspectSession(uuid string, yml bool)

func ListSessions

func ListSessions()

func SwitchSession

func SwitchSession(uuid string)

Types

type Interaction

type Interaction struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type Metadata

type Metadata struct {
	LatestSessionUuid string `json:"latest_session_uuid"`
}

type Session

type Session struct {
	Uuid     string        `json:"uuid"`
	Messages []Interaction `json:"history"`
}

func ClearSession

func ClearSession() *Session

func LoadLatest

func LoadLatest() *Session

func NewSession

func NewSession() *Session

func (*Session) AddMessage

func (s *Session) AddMessage(role string, content string)

func (*Session) Save

func (s *Session) Save()

Jump to

Keyboard shortcuts

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