Minimize D&D NPC extraction contracts
This commit is contained in:
@@ -49,9 +49,9 @@ func TestProductionCombatPipelineRetriesMergesNormalizesAndWritesJSON(t *testing
|
||||
|
||||
client := &fakeCombatLLMClient{responses: []string{
|
||||
combatTestInvalidEnumResponse("unsupported", "attack"),
|
||||
combatTestTurnResponse("The Greencloak", "turn", "watches", "The Greencloak", 1, 1),
|
||||
combatTestTurnResponse("mira thorn", "turn", "watches", "mira thorn", 1, 1),
|
||||
combatTestTurnResponse("Mira Thorn", "reaction", "asks", "Hooded Guard", 2, 2),
|
||||
combatTestTurnResponse("Hooded Guard", "turn", "attacks", "The Greencloak", 3, 3),
|
||||
combatTestTurnResponse("Hooded Guard", "turn", "attacks", "mira thorn", 3, 3),
|
||||
}}
|
||||
prepared, err := pipeline.Prepare(materialized, registries, pipeline.ModuleDependencies{LLM: client})
|
||||
if err != nil {
|
||||
@@ -250,8 +250,8 @@ type combatNPCPayload struct {
|
||||
func combatTestNPCPayload(t *testing.T) combatNPCPayload {
|
||||
t.Helper()
|
||||
value := dnd.NPCList{NPCs: []dnd.NPC{
|
||||
{ID: identity.DeriveID("Mira Thorn"), Name: "Mira Thorn", Aliases: []string{"The Greencloak", "Mira"}, Description: "A ranger.", Relationships: []dnd.NPCRelationship{}, SourceRefs: []source.SourceRef{{SourceID: "prior-npc-session", StartUnitID: 1, EndUnitID: 1}}},
|
||||
{ID: identity.DeriveID("Hooded Guard"), Name: "Hooded Guard", Aliases: []string{}, Description: "A sentry.", Relationships: []dnd.NPCRelationship{}, SourceRefs: []source.SourceRef{{SourceID: "prior-npc-session", StartUnitID: 3, EndUnitID: 3}}},
|
||||
{ID: identity.DeriveID("Mira Thorn"), Name: "Mira Thorn", SourceRefs: []source.SourceRef{{SourceID: "prior-npc-session", StartUnitID: 1, EndUnitID: 1}}},
|
||||
{ID: identity.DeriveID("Hooded Guard"), Name: "Hooded Guard", SourceRefs: []source.SourceRef{{SourceID: "prior-npc-session", StartUnitID: 3, EndUnitID: 3}}},
|
||||
}}
|
||||
content, err := npccodec.New().Encode(value)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user