Documentation ¶ Index ¶ func SaveState(filePath string, state State) func SaveTmpReview(filePath string, review string) type State func LoadState(stateFilePath string) State func (s *State) ShowUsage(cost config.ModelCost) string func (s *State) ShowUsedToken() string type Usage Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func SaveState ¶ func SaveState(filePath string, state State) func SaveTmpReview ¶ func SaveTmpReview(filePath string, review string) Types ¶ type State ¶ type State struct { PromptHistory []string `json:"promptHistory"` Usage Usage `json:"usage"` } func LoadState ¶ func LoadState(stateFilePath string) State func (*State) ShowUsage ¶ added in v0.2.0 func (s *State) ShowUsage(cost config.ModelCost) string func (*State) ShowUsedToken ¶ added in v0.2.0 func (s *State) ShowUsedToken() string type Usage ¶ added in v0.2.0 type Usage struct { PromptTokens, CompletionTokens int64 } Source Files ¶ View all Source files state.go Click to show internal directories. Click to hide internal directories.