debug

package
v0.1.79 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package debug is the debug mode of the models of a task from paper: 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. api makes a Store on a run whose tutor has its own adapters with the key of Anthropic, on a deployment too.

Index

Constants

This section is empty.

Variables

View Source
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

func (a *Action) Chosen() bool

Chosen is whether the action has a first model, by which tutor takes a call the admission list refuses.

func (*Action) Differ

func (a *Action) Differ(differ bool)

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.

func (*Action) Pair

func (a *Action) Pair() bool

Pair says whether the action reads the work by two readers.

func (*Action) Route

func (a *Action) Route(r tutor.Route) tutor.Route

Route is r with the mode of the action: its models and its record.

func (*Action) Solved

func (a *Action) Solved(key *paperv1.Key, took time.Duration)

Solved records the call of module-kit's solver on the formulas the statement's tasks read into: the key of the crop as it gave it, each task with its statement and the solver's answer, none where it gave 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.

func NewService

func NewService(s *Store, admitted func(tutor.Call) []admission.Model) *Service

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

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

func New(every bool) *Store

New is a Store with no choice: each call has its model of the list. every gives every account the right of the mode.

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

func (s *Store) Chosen(accountID string) bool

Chosen is whether the account has a first model, which bypasses the admission list as tutor does; a nil Store has none.

func (*Store) Open added in v0.1.74

func (s *Store) Open(c rpc.Caller) bool

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.

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.

func (*Store) Take

func (s *Store) Take(accountID string) []*v1.DebugAction

Take gives the account's actions since the last take, oldest first, and forgets them.

Jump to

Keyboard shortcuts

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