The Big One #43
@@ -97,8 +97,68 @@ test_program = Program(
|
|||||||
Goal(name="Tell a joke", plan=Plan(steps=[LLMAction(goal="Tell a joke.")])),
|
Goal(name="Tell a joke", plan=Plan(steps=[LLMAction(goal="Tell a joke.")])),
|
||||||
],
|
],
|
||||||
id=1,
|
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.")]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user