mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
feat(verifier): read llm config off globalThis.generator
This commit is contained in:
1 parent
aa67d7ddcf
commit
dcf7c4a02a
3 files changed
+13
-11
No files matched your search
@@ -88,7 +88,7 @@ func TestAllCandidatesNilTree(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLLMConfigDetectsMarker(t *testing.T) {
|
||||
v := newLoadedVerifier(t, `globalThis.actions = { kind: "llm", config: { model: "vendor/model" } };`)
|
||||
v := newLoadedVerifier(t, `globalThis.generator = { kind: "llm", config: { model: "vendor/model" } };`)
|
||||
config, ok := v.LLMConfig()
|
||||
if !ok {
|
||||
t.Fatal("LLMConfig not detected for llm marker")
|
||||
@@ -102,7 +102,7 @@ func TestLLMConfigDetectsMarker(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLLMConfigReadsInstructions(t *testing.T) {
|
||||
v := newLoadedVerifier(t, `globalThis.actions = { kind: "llm", config: { model: "m", instructions: "find bugs" } };`)
|
||||
v := newLoadedVerifier(t, `globalThis.generator = { kind: "llm", config: { model: "m", instructions: "find bugs" } };`)
|
||||
config, ok := v.LLMConfig()
|
||||
if !ok {
|
||||
t.Fatal("LLMConfig not detected")
|
||||
@@ -115,7 +115,7 @@ func TestLLMConfigReadsInstructions(t *testing.T) {
|
||||
func TestLLMConfigAbsentForSeededSpec(t *testing.T) {
|
||||
v := newLoadedVerifier(t, `globalThis.actions = { kind: "builtin", verb: "taps" };`)
|
||||
if _, ok := v.LLMConfig(); ok {
|
||||
t.Error("LLMConfig should be false for a non-llm actions root")
|
||||
t.Error("LLMConfig should be false when no generator is declared")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user