feat: integrate AgentSpeak with semantic belief extraction
ref: N25B-429
This commit is contained in:
@@ -332,7 +332,13 @@ class AgentSpeakGenerator:
|
||||
|
||||
@_astify.register
|
||||
def _(self, sb: SemanticBelief) -> AstExpression:
|
||||
return AstLiteral(f"semantic_{self._slugify_str(sb.description)}")
|
||||
return AstLiteral(self.get_semantic_belief_slug(sb))
|
||||
|
||||
@staticmethod
|
||||
def get_semantic_belief_slug(sb: SemanticBelief) -> str:
|
||||
# If you need a method like this for other types, make a public slugify singledispatch for
|
||||
# all types.
|
||||
return f"semantic_{AgentSpeakGenerator._slugify_str(sb.name)}"
|
||||
|
||||
@_astify.register
|
||||
def _(self, ib: InferredBelief) -> AstExpression:
|
||||
|
||||
Reference in New Issue
Block a user