Documentation
¶
Index ¶
- Constants
- func LastUUID(recs []Record) string
- func Messages(recs []Record) ([]llm.Message, llm.Usage)
- func NewAgentID() string
- func NewSessionID() string
- func SessionIDFrom(ctx context.Context) string
- func WithSessionID(ctx context.Context, sessionID string) context.Context
- type Record
- type Store
- func (s *Store) AgentPath(sessionID, agentID string) string
- func (s *Store) Append(path string, recs ...Record) error
- func (s *Store) Load(path string) ([]Record, error)
- func (s *Store) MainPath(sessionID string) string
- func (s *Store) NewWriter(sessionID, agentID string) *Writer
- func (s *Store) ResumeWriter(sessionID, lastUUID string) *Writer
- type Writer
Constants ¶
View Source
const ( TypeMessage = "message" TypeBoundary = "boundary" )
Variables ¶
This section is empty.
Functions ¶
func NewAgentID ¶
func NewAgentID() string
func NewSessionID ¶
func NewSessionID() string
func SessionIDFrom ¶
Types ¶
type Record ¶
type Record struct {
UUID string `json:"uuid"`
ParentUUID string `json:"parent_uuid,omitempty"`
SessionID string `json:"session_id"`
AgentID string `json:"agent_id,omitempty"`
IsSidechain bool `json:"is_sidechain,omitempty"`
Timestamp string `json:"timestamp"`
Type string `json:"type"`
Message *llm.Message `json:"message,omitempty"`
Usage *llm.Usage `json:"usage,omitempty"`
Boundary *llm.BoundaryMeta `json:"boundary,omitempty"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) ResumeWriter ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func (*Writer) RecordBoundary ¶
func (w *Writer) RecordBoundary(meta llm.BoundaryMeta)
Click to show internal directories.
Click to hide internal directories.