Cut modules over to Scriptorium prompts
This commit is contained in:
@@ -152,16 +152,15 @@ func TestRunnerPassesRosterAndGlossaryReferencesToDNDSpellsPrompt(t *testing.T)
|
||||
if len(llmClient.requests) != 1 {
|
||||
t.Fatalf("LLM calls = %d, want 1", len(llmClient.requests))
|
||||
}
|
||||
user := llmClient.requests[0].Messages[1].Content
|
||||
for _, want := range []string{
|
||||
"Roster reference material:",
|
||||
"Aria: party cleric",
|
||||
"Glossary reference material:",
|
||||
"Fire Bolt: evocation cantrip",
|
||||
} {
|
||||
if !strings.Contains(user, want) {
|
||||
t.Fatalf("user prompt = %q, want substring %q", user, want)
|
||||
}
|
||||
request := llmClient.requests[0]
|
||||
if len(request.Messages) != 0 {
|
||||
t.Fatalf("Messages = %#v, want no locally rendered prompt", request.Messages)
|
||||
}
|
||||
if got := string(request.Inputs["roster"].Content); got != "Aria: party cleric\nBorin: fighter" {
|
||||
t.Fatalf("roster input = %q, want reference text", got)
|
||||
}
|
||||
if got := string(request.Inputs["glossary"].Content); got != "Fire Bolt: evocation cantrip" {
|
||||
t.Fatalf("glossary input = %q, want reference text", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,9 +190,12 @@ func TestRunnerDoesNotExtractSpellMentionedOnlyInRoster(t *testing.T) {
|
||||
if len(llmClient.requests) != 1 {
|
||||
t.Fatalf("LLM calls = %d, want 1", len(llmClient.requests))
|
||||
}
|
||||
user := llmClient.requests[0].Messages[1].Content
|
||||
if !strings.Contains(user, "Lightning Bolt") {
|
||||
t.Fatalf("user prompt = %q, want roster-only spell in reference section", user)
|
||||
request := llmClient.requests[0]
|
||||
if len(request.Messages) != 0 {
|
||||
t.Fatalf("Messages = %#v, want no locally rendered prompt", request.Messages)
|
||||
}
|
||||
if got := string(request.Inputs["roster"].Content); !strings.Contains(got, "Lightning Bolt") {
|
||||
t.Fatalf("roster input = %q, want roster-only spell in reference input", got)
|
||||
}
|
||||
if output.Manifest.ValidationStatus != "approved" {
|
||||
t.Fatalf("ValidationStatus = %q, want approved empty extraction", output.Manifest.ValidationStatus)
|
||||
|
||||
Reference in New Issue
Block a user