Version, authenticate and fully trace ecosystem calls #84
@@ -30,7 +30,7 @@ import (
|
||||
// model load. No turn ever gets half of one model and half of another.
|
||||
// "Every path" means every path: the router, the replier, the mail
|
||||
// extractor and the memory evaluator do not call acquire, they call
|
||||
// llm.Client.Complete, so LLMPhraser implements llm.Gate and the client
|
||||
// llm.Client.Complete, so LLMPhraser implements llm.SwapGate and the client
|
||||
// enters through the same counter.
|
||||
//
|
||||
// 3. A failed load rolls back to the model that was working. The new server is
|
||||
@@ -149,7 +149,7 @@ func (p *LLMPhraser) acquire() (string, func(), error) {
|
||||
}, nil
|
||||
}
|
||||
|
||||
// Enter implements llm.Gate so every holder of an *llm.Client is drained by a
|
||||
// Enter implements llm.SwapGate so every holder of an *llm.Client is drained by a
|
||||
// swap, not only the phrasing paths in this package.
|
||||
//
|
||||
// The router, the replier, the mail extractor and the memory evaluator do not
|
||||
|
||||
@@ -40,7 +40,7 @@ func TestSwap_WaitsForARouterCallThatWentThroughLLMClient(t *testing.T) {
|
||||
|
||||
release := make(chan struct{})
|
||||
c := llm.New(blockingLLM(t, release).URL, 5*time.Second)
|
||||
c.SetGate(p)
|
||||
c.SetSwapGate(p)
|
||||
|
||||
completed := make(chan error, 1)
|
||||
go func() {
|
||||
@@ -81,7 +81,7 @@ func TestSwap_RefusesARouterCallThatArrivesMidSwap(t *testing.T) {
|
||||
open := make(chan struct{})
|
||||
close(open)
|
||||
c := llm.New(blockingLLM(t, open).URL, 5*time.Second)
|
||||
c.SetGate(p)
|
||||
c.SetSwapGate(p)
|
||||
|
||||
// Hold the door shut the way quiesce does.
|
||||
_, held, err := p.acquire()
|
||||
|
||||
Reference in New Issue
Block a user