feat: add a second phase in test_program

ref: N25B-376
This commit is contained in:
Twirre Meulenbelt
2025-12-16 15:12:22 +01:00
parent 4a432a603f
commit 8cc177041a

View File

@@ -97,7 +97,67 @@ test_program = Program(
Goal(name="Tell a joke", plan=Plan(steps=[LLMAction(goal="Tell a joke.")])),
],
id=1,
)
),
Phase(
id=2,
norms=[
BasicNorm(norm="Use very gentle speech."),
ConditionalNorm(
condition=SemanticBelief(
description="We are talking to a child", name="talking to child"
),
norm="Do not use cuss words",
),
],
triggers=[
Trigger(
condition=InferredBelief(
left=KeywordBelief(keyword="help"),
right=SemanticBelief(description="User is stuck", name="stuck"),
operator=LogicalOperator.OR,
name="help_or_stuck",
),
plan=Plan(
steps=[
Goal(
name="Unblock user",
plan=Plan(
steps=[
LLMAction(
goal="Provide a step-by-step path to "
"resolve the user's issue."
)
]
),
),
]
),
),
],
goals=[
Goal(
name="Clarify intent",
plan=Plan(
steps=[
LLMAction(
goal="Ask 1-2 targeted questions to clarify the "
"user's intent, then proceed."
)
]
),
),
Goal(
name="Provide solution",
plan=Plan(
steps=[LLMAction(goal="Deliver a solution to complete the user's goal.")]
),
),
Goal(
name="Summarize next steps",
plan=Plan(steps=[LLMAction(goal="Summarize what the user should do next.")]),
),
],
),
]
)