Migrate spell extraction to native execution and semantic continuation
This commit is contained in:
@@ -10,9 +10,9 @@ import (
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/modules/dnd"
|
||||
)
|
||||
|
||||
func TestNewRequiresLLMClientAndReturnsExtractor(t *testing.T) {
|
||||
if _, err := New(nil, Options{}); err == nil || !strings.Contains(err.Error(), "LLM client") {
|
||||
t.Fatalf("New(nil) error = %v, want LLM client error", err)
|
||||
func TestNewRequiresNativeEngineAndReturnsExtractor(t *testing.T) {
|
||||
if _, err := New(nil, Options{}); err == nil || !strings.Contains(err.Error(), "native engine") {
|
||||
t.Fatalf("New(nil) error = %v, want native engine error", err)
|
||||
}
|
||||
extractor := newExtractor(t, &fakeSpellsLLMClient{})
|
||||
if extractor.Key() != Key {
|
||||
@@ -23,10 +23,10 @@ func TestNewRequiresLLMClientAndReturnsExtractor(t *testing.T) {
|
||||
func TestModuleSpec(t *testing.T) {
|
||||
got := ModuleSpec()
|
||||
want := pipeline.ModuleSpec{
|
||||
Key: Key,
|
||||
Stage: pipeline.StageExtract,
|
||||
ExecutionClass: contracts.ExecutionClassLLMBacked,
|
||||
CorrectionProtocol: contracts.CorrectionProtocolSingleResponseV1,
|
||||
Key: Key,
|
||||
Stage: pipeline.StageExtract,
|
||||
ExecutionClass: contracts.ExecutionClassLLMBacked,
|
||||
Prompts: []string{PromptID, CorrectionPromptID},
|
||||
Requires: []string{
|
||||
"chunks",
|
||||
"source.transcript",
|
||||
@@ -75,6 +75,7 @@ func TestModuleSpec(t *testing.T) {
|
||||
t.Fatalf("ModuleSpec() = %#v, want %#v", got, want)
|
||||
}
|
||||
|
||||
got.Prompts[0] = "changed"
|
||||
got.Requires[0] = "changed"
|
||||
got.Provides[0] = "changed"
|
||||
got.ReferenceSlots[0].AcceptedMediaTypes[0] = "changed"
|
||||
|
||||
Reference in New Issue
Block a user