You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@burr.apache.org by je...@apache.org on 2026/08/29 14:32:21 UTC

(burr) branch main updated: docs: fix the Graph API example on the applications page (#894)

This is an automated email from the ASF dual-hosted git repository.

jernejfrank pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/burr.git


The following commit(s) were added to refs/heads/main by this push:
     new b75c01d8 docs: fix the Graph API example on the applications page (#894)
b75c01d8 is described below

commit b75c01d861ecf0e75c2afd9b131c7f036b96c0e0
Author: Excelius <57...@users.noreply.github.com>
AuthorDate: Sat Aug 29 22:32:17 2026 +0800

    docs: fix the Graph API example on the applications page (#894)
    
    The snippet was missing a dot on .with_state, so it raised a SyntaxError
    when copied, and it imported default/expr while leaving GraphBuilder
    undefined.
    
    Co-authored-by: zhao.wang <zh...@bytedance.com>
    Co-authored-by: Cursor <cu...@cursor.com>
---
 docs/concepts/state-machine.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/concepts/state-machine.rst b/docs/concepts/state-machine.rst
index 862a16fa..8f168fa0 100644
--- a/docs/concepts/state-machine.rst
+++ b/docs/concepts/state-machine.rst
@@ -172,7 +172,7 @@ in a web-server (create a graph once, application many times), import the graph
 
 .. code-block:: python
 
-    from burr.core import ApplicationBuilder, default, expr
+    from burr.core import ApplicationBuilder, GraphBuilder
     graph = (
         GraphBuilder()
         .with_actions(human_input, ai_response)
@@ -184,7 +184,7 @@ in a web-server (create a graph once, application many times), import the graph
     app = (
         ApplicationBuilder()
         .with_graph(graph)
-        with_state(chat_history=[])
+        .with_state(chat_history=[])
         .with_entrypoint("human_input")
         .build()
     )