state

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL