debug

package
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 20 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: which models serve the calls of AI of a task from paper, past the admission list, and what every call of a model made for the account returned and cost — of a task from paper, of a task of a module, of an essay, of the tutor's words, of grown-up mode —, for an account with the right of the mode. The choice serves a task from paper alone, where the author compares models; the record is of every call, so that the cost of a session is all it spent. 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 that may call a model 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) 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) Route

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

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

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: its first model alone, since the Check is one call of one model and has no second.

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. A second model is not read: the Check has no second reader.

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