Documentation
¶
Overview ¶
Package trajectory records an agent run as JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trajectory ¶
type Trajectory struct {
Task string `json:"task"`
Model string `json:"model"`
Messages []model.Message `json:"messages"`
Steps int `json:"steps"`
Cost float64 `json:"cost"`
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
// Prompt-cache totals, included in InputTokens.
CacheReadTokens int `json:"cache_read_tokens,omitempty"`
CacheWriteTokens int `json:"cache_write_tokens,omitempty"`
ExitStatus string `json:"exit_status"`
Submission string `json:"submission"`
}
func (*Trajectory) Save ¶
func (t *Trajectory) Save(path string) error
Save writes the trajectory to path atomically, so a crash mid-write never leaves a truncated file.
Click to show internal directories.
Click to hide internal directories.