Documentation
¶
Overview ¶
Package inferencetest is a fake registry's credits sessions for tests: it opens, renews and ends sessions as a SecureAgentry registry does, and records each call.
Index ¶
Constants ¶
View Source
const ( SignIn = "agy_fakesigninfortestsonly0000000000000000000000000" Token = "agym_fakesessiontokenfortestsonly" Model = "fake-model-1" )
SignIn is the registry sign-in the fake accepts; Token prefixes the session tokens it answers. Both are fake values of the real shapes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
*httptest.Server
NoCredits bool
// RenewEverySeconds is what an open answers (0: 900).
RenewEverySeconds int64
// Usage is the tokens and credits each session's view reports.
InputTokens, OutputTokens, Credits int64
// EndRenewals makes every renewal answer 410, as for a session ended.
EndRenewals bool
// contains filtered or unexported fields
}
Registry is the fake. Set NoCredits before a call to answer 402.
func (*Registry) SetEndRenewals ¶
SetEndRenewals sets EndRenewals while the fake is serving.
Click to show internal directories.
Click to hide internal directories.