Documentation
¶
Overview ¶
Package debug is the debug mode of the models of a task from paper (R97; R163 spec): which models serve its calls of AI, past the admission list, and what each call returned and cost, for an account with the right of the mode. 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). api makes a Store on a run whose tutor has its own adapters with the key of Anthropic, on a deployment too.
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) Open(c rpc.Caller) 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 or an account without its right, 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 on a run with a Store, and without one 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 New ¶
New is a Store with no choice: each call has its model of the list. every gives every account the right of the mode (R97).
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) Open ¶ added in v0.1.74
Open says whether the mode is open to the caller: an account whose row has the right, or any account of a store that gives it to every one. A nil Store, of a run without the mode, opens it to none (R97).
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.