fix: single dispatch order
ref: N25B-429
This commit is contained in:
@@ -378,23 +378,23 @@ class AgentSpeakGenerator:
|
|||||||
def _(self, la: LLMAction) -> AstExpression:
|
def _(self, la: LLMAction) -> AstExpression:
|
||||||
return AstLiteral("reply_with_goal", [AstString(la.goal)])
|
return AstLiteral("reply_with_goal", [AstString(la.goal)])
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@singledispatchmethod
|
@singledispatchmethod
|
||||||
|
@staticmethod
|
||||||
def slugify(element: ProgramElement) -> str:
|
def slugify(element: ProgramElement) -> str:
|
||||||
raise NotImplementedError(f"Cannot convert element {element} to a slug.")
|
raise NotImplementedError(f"Cannot convert element {element} to a slug.")
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@slugify.register
|
@slugify.register
|
||||||
|
@staticmethod
|
||||||
def _(sb: SemanticBelief) -> str:
|
def _(sb: SemanticBelief) -> str:
|
||||||
return f"semantic_{AgentSpeakGenerator._slugify_str(sb.name)}"
|
return f"semantic_{AgentSpeakGenerator._slugify_str(sb.name)}"
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@slugify.register
|
@slugify.register
|
||||||
|
@staticmethod
|
||||||
def _(g: Goal) -> str:
|
def _(g: Goal) -> str:
|
||||||
return AgentSpeakGenerator._slugify_str(g.name)
|
return AgentSpeakGenerator._slugify_str(g.name)
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
@slugify.register
|
@slugify.register
|
||||||
|
@staticmethod
|
||||||
def _(t: Trigger):
|
def _(t: Trigger):
|
||||||
return f"trigger_{AgentSpeakGenerator._slugify_str(t.name)}"
|
return f"trigger_{AgentSpeakGenerator._slugify_str(t.name)}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user