Documentation
¶
Overview ¶
Package debug is the debug mode of a local run with models (R97; R163 spec): which models serve the calls of AI of a task from paper, past the admission list, and what each call returned and cost. Its choice and its calls are each account's, in the memory of the process alone: nothing of them goes to the log or to the database (R09 spec), and api makes a Store only with API_DEBUG_MODELS, which a deployment refuses.
Index ¶
- Variables
- func Models() []*v1.DebugModel
- type Action
- type Service
- func (s *Service) GetDebug(ctx context.Context, _ *v1.GetDebugRequest) (*v1.GetDebugResponse, error)
- func (s *Service) SetDebugModels(ctx context.Context, req *v1.SetDebugModelsRequest) (*v1.SetDebugModelsResponse, error)
- func (s *Service) TakeDebugCalls(ctx context.Context, _ *v1.TakeDebugCallsRequest) (*v1.TakeDebugCallsResponse, error)
- type Store
- func (s *Store) Begin(accountID string, kind v1.DebugActionKind, attemptID string, at time.Time) *Action
- func (s *Store) Choice(accountID string) *v1.DebugChoice
- func (s *Store) Chosen(accountID string) bool
- func (s *Store) SetChoice(accountID string, c *v1.DebugChoice) (*v1.DebugChoice, error)
- func (s *Store) Take(accountID string) []*v1.DebugAction
Constants ¶
This section is empty.
Variables ¶
var ErrChoice = errors.New("debug: not a choice of the models")
ErrChoice is a choice of a model the catalog does not name, an effort it does not take, or thinking off where the model or the effort keeps it on.
Functions ¶
func Models ¶
func Models() []*v1.DebugModel
Models are the models that can be chosen: tutor's catalog of Claude, cheapest first.
Types ¶
type Action ¶
type Action struct {
// contains filtered or unexported fields
}
Action is one request of a task from paper while it runs: the route it gives tutor, and the calls it records. A nil Action, of a run without the mode, records nothing and leaves a route as it is.
func (*Action) Chosen ¶
Chosen is whether the action has a first model, by which tutor takes a call the admission list refuses.
func (*Action) Differ ¶
Differ records whether the two readers read a place of the work differently.
func (*Action) End ¶
func (a *Action) End()
End keeps the action for the account's next take, when it made a call: a repeat or a refusal before any call keeps none.
type Service ¶
type Service struct {
apiv1connect.UnimplementedDebugServiceHandler
// contains filtered or unexported fields
}
Service is the DebugService of a Store: api registers it only with the debug flag, and without it each method answers unimplemented (R97).
func NewService ¶
NewService is the DebugService of s, whose admitted gives the models the admission list gives a call for an adult on platform AI, in their order.
func (*Service) GetDebug ¶
func (s *Service) GetDebug(ctx context.Context, _ *v1.GetDebugRequest) (*v1.GetDebugResponse, error)
GetDebug gives the models that can be chosen and the account's choice.
func (*Service) SetDebugModels ¶
func (s *Service) SetDebugModels(ctx context.Context, req *v1.SetDebugModelsRequest) (*v1.SetDebugModelsResponse, error)
SetDebugModels sets the account's choice, or refuses one the models do not take with invalid_argument.
func (*Service) TakeDebugCalls ¶
func (s *Service) TakeDebugCalls(ctx context.Context, _ *v1.TakeDebugCallsRequest) (*v1.TakeDebugCallsResponse, error)
TakeDebugCalls gives the account's actions since the last take and forgets them.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is the choice and the actions of each account.
func (*Store) Begin ¶
func (s *Store) Begin(accountID string, kind v1.DebugActionKind, attemptID string, at time.Time) *Action
Begin is an action of the account by its choice now; a nil Store begins none.
func (*Store) Choice ¶
func (s *Store) Choice(accountID string) *v1.DebugChoice
Choice is the account's choice now.
func (*Store) Chosen ¶
Chosen is whether the account has a first model, which bypasses the admission list as tutor does (R97); a nil Store has none.
func (*Store) SetChoice ¶
func (s *Store) SetChoice(accountID string, c *v1.DebugChoice) (*v1.DebugChoice, error)
SetChoice sets the account's choice, from its next action on.