Documentation
¶
Index ¶
- func ComputeTurnID(parentID string, messages []message.Message) string
- func TurnLabel(messages []message.Message) string
- type Session
- type Store
- func (s *Store) Ancestry(sessionID, turnID string) ([]Turn, error)
- func (s *Store) CommitTurn(sessionID string, turn *Turn) error
- func (s *Store) Create() (*Session, error)
- func (s *Store) Delete(id string) error
- func (s *Store) Dir() string
- func (s *Store) List() ([]*Session, error)
- func (s *Store) Load(id string) (*Session, error)
- func (s *Store) LoadTurn(sessionID, turnID string) (*Turn, error)
- func (s *Store) SaveMeta(sess *Session) error
- func (s *Store) SetName(sess *Session, firstMessage string)
- func (s *Store) TurnIndex(sessionID string) ([]TurnMeta, error)
- type Turn
- type TurnMeta
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct {
ID string `json:"id"`
Name string `json:"name"`
Hash string `json:"hash"`
Named bool `json:"named"`
CurrentTurn string `json:"currentTurn"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
TurnCount int `json:"turnCount"`
PromptTokens int `json:"promptTokens"`
CompletionTokens int `json:"completionTokens"`
TotalTokens int `json:"totalTokens"`
ContextTokens int `json:"contextTokens"`
}
Click to show internal directories.
Click to hide internal directories.