Documentation
¶
Index ¶
- func ComputeTurnID(parentID string, messages []message.Message) string
- func TurnLabel(messages []message.Message) string
- type Cache
- type KeyStore
- 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 KeyStore ¶ added in v0.1.1
type KeyStore struct {
// contains filtered or unexported fields
}
func NewKeyStore ¶ added in v0.1.1
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"`
Cost float64 `json:"cost"`
CompactedSummary string `json:"compactedSummary"`
CompactedUpTo string `json:"compactedUpTo"`
}
Click to show internal directories.
Click to hide internal directories.