]> git.giacomolli.uk - onechat/blobdiff - probe.go
Version the package and command from the commit
[onechat] / probe.go
index f5553ce5b73ec164e213f0b0be22b990f8b34223..d788fa99cfe7d2f95269be231b0815c04c10ff95 100644 (file)
--- a/probe.go
+++ b/probe.go
@@ -18,13 +18,16 @@ const (
        // probeName is the agent name of a probe run. The cache key comes from
        // it.
        probeName = "Probe"
+
+       // probeCallLimit is the most model calls of a probe run.
+       probeCallLimit = 660
 )
 
 // probe runs "onechat probe LOG COUNT [BUILDS]". It appends the first COUNT
 // messages of LOG, one JSON object {kind, text} per line, to a new chat in
 // probe/ in the data directory, and builds its tree with the real compactor.
 // Before each user message it waits for the builds, as a turn does. It stops at
-// the first failed call, after buildCallLimit calls, or when the used percent
+// the first failed call, after probeCallLimit calls, or when the used percent
 // of a quota window grows by more than buildQuotaLimit points. At the end it
 // reports the calls, the time per call, the calls at once, the cached share,
 // the quota, the retries, and the line sizes. BUILDS, from 1 to buildMax,
@@ -97,7 +100,7 @@ func probe(ctx context.Context, args []string, out io.Writer) (err error) {
 
        usagePath := filepath.Join(root, "usage.jsonl")
        client := newModelClient(address, auth, "onechat-"+probeName, usagePath)
-       client.LimitCalls(buildCallLimit)
+       client.LimitCalls(probeCallLimit)
 
        summarizer := ProbeSlotSummarizer{
                inner: newCompactor(client, probePrompt, config.Compactor),