Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.
Python aiburrchatbot-frameworkdagsgenerative-aigraphshacktoberfestllmopsllmsmlopspersistent-data-structurestate-machinestate-managementvisibility
Error message fixes + typing improvements
elijahbenizzy79bd68a3b95c
diff --git a/burr/core/action.py b/burr/core/action.pyindex 194a3715..33d51e00 100644--- a/burr/core/action.py+++ b/burr/core/action.py@@ -225,9 +225,13 @@ class Condition(Function):return self._name-default = Condition.default-when = Condition.when-expr = Condition.expr+# Annotated inline as linters don't understand classmethods + properties+# These, however, are allowed up until python 3.13+# We're only keeping them as methods for documentation+# TODO -- remove the static methods and make them+default: Condition = Condition.default+when: Condition = Condition.when+expr: Condition = Condition.exprclass Result(Action):diff --git a/burr/core/application.py b/burr/core/application.pyindex 1787953d..ecf54ff7 100644--- a/burr/core/application.py+++ b/burr/core/application.py@@ -387,12 +387,13 @@ class Application:f"We have hit halt_after condition with prior action: {prior_action_name}. "f"Returning: prior_action={prior_action}, result, and state")+ return prior_action, result, self._statelogger.warning(- "We have it an undefined condition -- do not rely on this behavior. ""This is trying to return without having computed a single action -- ""we'll end up just returning some Nones. This means that nothing was executed ""(E.G. that the state machine had nowhere to go). Either fix the state machine or"f"the halt conditions, or both... Halt conditions are: halt_before={halt_before}, halt_after={halt_after}."+ f"Note that this is considered undefined behavior -- if you get here, you should fix!")return prior_action, result, self._state