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
Minor fixes for Burr documentation
elijahbenizzy407297cf4a9f
diff --git a/docs/concepts/state-machine.rst b/docs/concepts/state-machine.rstindex f6619bec..ae84471e 100644--- a/docs/concepts/state-machine.rst+++ b/docs/concepts/state-machine.rst@@ -117,14 +117,18 @@ If multiple are specified, it will stop after the first one encountered, and the.. code-block:: python- final_state, results = application.run(halt_after=["final_action_1", "final_action_2"])+ action, result, state = application.run(+ halt_after=["final_action_1", "final_action_2"]+ )In the async context, you can run ``arun``:.. code-block:: python- final_state = await application.arun(halt_after=["final_action_1", "final_action_2"])+ action, result, state = await application.arun(+ halt_after=["final_action_1", "final_action_2"]+ ).. note::You can add inputs to ``run``/``arun`` in the same way as you can with ``iterate`` -- it will only apply to the first action.diff --git a/docs/concepts/transitions.rst b/docs/concepts/transitions.rstindex ec79ca03..bbb7da11 100644--- a/docs/concepts/transitions.rst+++ b/docs/concepts/transitions.rst@@ -31,6 +31,7 @@ Conditions have a few APIs, but the most common are the three convenience functi("from", "to", when(foo="bar"), # will evaluate when the state has the variable "foo" set to the value "bar"("from", "to", expr('epochs>100')) # will evaluate to True when the state has the variable "foo" set to the value "bar"("from", "to", default) # will always evaluate to True+ ("from", "to") # leaving out a third conditions we allow defaults)diff --git a/docs/getting_started/install.rst b/docs/getting_started/install.rstindex fa7c8528..8b0a53ac 100644--- a/docs/getting_started/install.rst+++ b/docs/getting_started/install.rst@@ -2,7 +2,7 @@Installing==========-Burr itself requires almost no dependencies. Every "extra"/"plugin" is an additional install target.+Burr itself requires almost no dependencies. Every *extra*/*plugin* is an additional install target.We recommend you start with installing the ``learn`` target -- this has dependencies necessary to track burr through the UI,along with a fully built server.diff --git a/docs/getting_started/simple-example.rst b/docs/getting_started/simple-example.rstindex 3029b989..a9b583cb 100644--- a/docs/getting_started/simple-example.rst+++ b/docs/getting_started/simple-example.rst@@ -39,7 +39,7 @@ Build a Simple ChatbotLet's build! Our chatbot will accept user input and pass it to an AI. The AI will then respond with a message.-Let's start by defining some actions, the building-block of Burr. You can think of actions as a function that+Let's start by defining some actions, the building-blocks of Burr. You can think of actions as a function thatcomputes a result and modifies state. They declare what they read and write.@@ -115,7 +115,7 @@ Let's note the following about how we define the application1. It is an infinite loop! It is meant to pause for new prompt input.2. We're just using the function names as the action names. You can also name them if you want ``with_actions(human_input=human_input, ai_response=ai_response)``.3. We start it with an empty ``chat_history`` state field-4. It utilizes a `builder pattern <https://en.wikipedia.org/wiki/Builder_pattern#:~:text=The%20builder%20pattern%20is%20a,Gang%20of%20Four%20design%20patterns>`_ -- this is a bit old-school (comes from the java days), but is an easy/modular way to express your appliaction+4. It utilizes a `builder pattern <https://en.wikipedia.org/wiki/Builder_pattern#:~:text=The%20builder%20pattern%20is%20a,Gang%20of%20Four%20design%20patterns>`_ -- this is a bit old-school (comes from the java days), but is an easy/modular way to express your applicationFinally, we can run the application -- it gives back multiple pieces of information but all we'll use is the state.diff --git a/docs/getting_started/why-burr.rst b/docs/getting_started/why-burr.rstindex b8a02639..530ecfc7 100644--- a/docs/getting_started/why-burr.rst+++ b/docs/getting_started/why-burr.rst@@ -15,7 +15,9 @@ Why do you need a state machine for your applications? Won't the normal programmYou can always patch together various frameworks or build it all yourself, but at that point you're going to be spending a lot of time on tasks thatare not related to the core value proposition of your software.-Burr was built with this all in mind. By modeling your application as a state machine of simple python constructs you can have the best of both worlds.+**Burr was built to make these all easier.**++By modeling your application as a state machine of simple python constructs you can have the best of both worlds.Bring in whatever infrastructure/tooling you want and get all of the above. Burr is meant to start off as an extremely lightweight tool tomake building LLM (+ a wide swath of other) applications easier. The value compounds as you leverage more of the ecosystems, plugins, and additionalfeatures it provides.