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
Adds missing headers to files
Stefan Krawczyk8801b2be663f
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex 00973047..7905de2c 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# pre-commit hooks require a user to have installed `pre-commit`:# $ brew install pre-commit# Then install the hooks within the repo:diff --git a/.style.yapf b/.style.yapfindex df98eb3d..fd8f1fcf 100644--- a/.style.yapf+++ b/.style.yapf@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+[style]based_on_style = googlediff --git a/burr/tracking/server/s3/deployment/terraform/.terraform.lock.hcl b/burr/tracking/server/s3/deployment/terraform/.terraform.lock.hclindex c1b586a8..ef8d24da 100644--- a/burr/tracking/server/s3/deployment/terraform/.terraform.lock.hcl+++ b/burr/tracking/server/s3/deployment/terraform/.terraform.lock.hcl@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# This file is maintained automatically by "terraform init".# Manual edits may be lost in future updates.diff --git a/examples/deep-researcher/notebook.ipynb b/examples/deep-researcher/notebook.ipynbindex 2a3a53e6..e494798d 100644--- a/examples/deep-researcher/notebook.ipynb+++ b/examples/deep-researcher/notebook.ipynb@@ -1,10 +1,30 @@{"cells": [{+ "metadata": {},"cell_type": "code",- "execution_count": 1,- "id": "595fafdc-5e12-4ab7-8e21-18e49c453340",+ "outputs": [],+ "execution_count": null,+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "4d47e95ddd66c645"+ },+ {"metadata": {},+ "cell_type": "code","outputs": [{"name": "stdout",@@ -94,8 +114,8 @@"Requirement already satisfied: referencing>=0.28.4 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit->burr[start]) (0.36.2)\n","Requirement already satisfied: rpds-py>=0.7.1 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit->burr[start]) (0.24.0)\n","\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.1\u001b[0m\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m24.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m25.1\u001B[0m\n",+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n","Requirement already satisfied: openai in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (1.75.0)\n","Requirement already satisfied: anyio<5,>=3.5.0 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from openai) (4.9.0)\n","Requirement already satisfied: distro<2,>=1.7.0 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from openai) (1.9.0)\n",@@ -113,8 +133,8 @@"Requirement already satisfied: pydantic-core==2.33.1 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from pydantic<3,>=1.9.0->openai) (2.33.1)\n","Requirement already satisfied: typing-inspection>=0.4.0 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from pydantic<3,>=1.9.0->openai) (0.4.0)\n","\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.1\u001b[0m\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n",+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m24.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m25.1\u001B[0m\n",+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n","Requirement already satisfied: tavily-python in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (0.5.4)\n","Requirement already satisfied: requests in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from tavily-python) (2.32.3)\n","Requirement already satisfied: tiktoken>=0.5.1 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from tavily-python) (0.9.0)\n",@@ -130,16 +150,18 @@"Requirement already satisfied: sniffio>=1.1 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from anyio->httpx->tavily-python) (1.3.1)\n","Requirement already satisfied: typing_extensions>=4.5 in /home/maggie/.pyenv/versions/3.12.9/lib/python3.12/site-packages (from anyio->httpx->tavily-python) (4.13.2)\n","\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m24.3.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m25.1\u001b[0m\n",- "\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\n"+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m24.3.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m25.1\u001B[0m\n",+ "\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n"]}],+ "execution_count": 1,"source": ["!pip install burr[start]\n","!pip install openai\n","!pip install tavily-python"- ]+ ],+ "id": "e88d57bd5e8cffb"},{"cell_type": "code",diff --git a/examples/deep-researcher/requirements.txt b/examples/deep-researcher/requirements.txtindex 42183b42..b498e389 100644--- a/examples/deep-researcher/requirements.txt+++ b/examples/deep-researcher/requirements.txt@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+burr[start]openaitavily-pythondiff --git a/examples/email-assistant/notebook.ipynb b/examples/email-assistant/notebook.ipynbindex 4e8d1476..f63ca4d9 100644--- a/examples/email-assistant/notebook.ipynb+++ b/examples/email-assistant/notebook.ipynb@@ -1,19 +1,39 @@{"cells": [{+ "metadata": {},"cell_type": "code",+ "outputs": [],"execution_count": null,- "id": "40392f86b8ad9a3f",+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "b12d533ee9ffae9"+ },+ {"metadata": {"collapsed": false,"jupyter": {"outputs_hidden": false}},+ "cell_type": "code","outputs": [],- "source": [- "!pip install burr[start] openai"- ]+ "execution_count": null,+ "source": "!pip install burr[start] openai",+ "id": "25717d145f989eec"},{"cell_type": "markdown",diff --git a/examples/email-assistant/requirements.txt b/examples/email-assistant/requirements.txtindex d0d56c1a..eb4d5e7a 100644--- a/examples/email-assistant/requirements.txt+++ b/examples/email-assistant/requirements.txt@@ -1,2 +1,16 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+burr[start]openaidiff --git a/examples/hello-world-counter/notebook.ipynb b/examples/hello-world-counter/notebook.ipynbindex 89123b9b..c34b692a 100644--- a/examples/hello-world-counter/notebook.ipynb+++ b/examples/hello-world-counter/notebook.ipynb@@ -1,19 +1,39 @@{"cells": [{+ "metadata": {},"cell_type": "code",+ "outputs": [],"execution_count": null,- "id": "e9dbe2a53575403a",+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "62688b26eff3080f"+ },+ {"metadata": {"collapsed": false,"jupyter": {"outputs_hidden": false}},+ "cell_type": "code","outputs": [],- "source": [- "!pip install burr[start]"- ]+ "execution_count": null,+ "source": "!pip install burr[start]",+ "id": "500d692cd72c67b3"},{"cell_type": "code",diff --git a/examples/multi-modal-chatbot/burr_demo.ipynb b/examples/multi-modal-chatbot/burr_demo.ipynbindex cf916962..b18f4fc4 100644--- a/examples/multi-modal-chatbot/burr_demo.ipynb+++ b/examples/multi-modal-chatbot/burr_demo.ipynb@@ -1,15 +1,36 @@{"cells": [{- "cell_type": "markdown",- "id": "f63df3e4b8d4fdba","metadata": {},+ "cell_type": "code",+ "outputs": [],+ "execution_count": null,+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "f19821bfb84682cd"+ },+ {+ "metadata": {},+ "cell_type": "markdown","source": [- "# Burr Demo - observing state \n",+ "# Burr Demo - observing state\n","# & traveling back in time!\n","\n","\n",- "<img src=\"https://github.com/user-attachments/assets/2ab9b499-7ca2-4ae9-af72-ccc775f30b4e\" width=\"100\" align=\"left\" /> + \n",+ "<img src=\"https://github.com/user-attachments/assets/2ab9b499-7ca2-4ae9-af72-ccc775f30b4e\" width=\"100\" align=\"left\" /> +\n","<img src=\"https://cdn.mos.cms.futurecdn.net/VgGxJABA8DcfAMpPPwdv6a.jpg\" width=\"200\" align=\"center\"/>\n","\n","[https://github.com/dagworks-inc/burr](https://github.com/dagworks-inc/burr) by DAGWorks Inc. (YCW23 & StartX).\n",@@ -19,7 +40,8 @@" - high level what is Burr\n"," - what you can do with Burr (observing state & being able to debug a particular point in time)\n"," - watch a walkthrough of this [notebook here](https://youtu.be/hqutVJyd3TI)."- ]+ ],+ "id": "a18d66ec7ff9b666"},{"cell_type": "markdown",@@ -698,21 +720,21 @@"evalue": "Demo error","output_type": "error","traceback": [- "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",- "\u001b[0;31mValueError\u001b[0m Traceback (most recent call last)",- "Cell \u001b[0;32mIn[4], line 5\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mquit\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m==\u001b[39m user_input\u001b[38;5;241m.\u001b[39mlower():\n\u001b[1;32m 4\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n\u001b[0;32m----> 5\u001b[0m last_action, action_result, app_state \u001b[38;5;241m=\u001b[39m \u001b[43mapp\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 6\u001b[0m \u001b[43m \u001b[49m\u001b[43mhalt_after\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m[\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mresponse\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[43m \u001b[49m\u001b[43minputs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m{\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mprompt\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43muser_input\u001b[49m\u001b[43m}\u001b[49m\n\u001b[1;32m 8\u001b[0m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 9\u001b[0m last_message \u001b[38;5;241m=\u001b[39m app_state[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mchat_history\u001b[39m\u001b[38;5;124m\"\u001b[39m][\u001b[38;5;241m-\u001b[39m\u001b[38;5;241m1\u001b[39m]\n\u001b[1;32m 10\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m last_message[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m'\u001b[39m] \u001b[38;5;241m==\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mimage\u001b[39m\u001b[38;5;124m'\u001b[39m:\n",- "File \u001b[0;32m~/dagworks/burr/burr/telemetry.py:276\u001b[0m, in \u001b[0;36mcapture_function_usage.<locals>.wrapped_fn\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 273\u001b[0m \u001b[38;5;129m@functools\u001b[39m\u001b[38;5;241m.\u001b[39mwraps(call_fn)\n\u001b[1;32m 274\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mwrapped_fn\u001b[39m(\u001b[38;5;241m*\u001b[39margs, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[1;32m 275\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 276\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcall_fn\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 277\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 278\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m is_telemetry_enabled():\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:616\u001b[0m, in \u001b[0;36m_call_execute_method_pre_post.__call__.<locals>.wrapper_sync\u001b[0;34m(app_self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 614\u001b[0m exc \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 615\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 616\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfn\u001b[49m\u001b[43m(\u001b[49m\u001b[43mapp_self\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 617\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 618\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcall_post(app_self, exc)\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:1168\u001b[0m, in \u001b[0;36mApplication.run\u001b[0;34m(self, halt_before, halt_after, inputs)\u001b[0m\n\u001b[1;32m 1166\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m 1167\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m-> 1168\u001b[0m \u001b[38;5;28;43mnext\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mgen\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1169\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mStopIteration\u001b[39;00m \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[1;32m 1170\u001b[0m result \u001b[38;5;241m=\u001b[39m e\u001b[38;5;241m.\u001b[39mvalue\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:1111\u001b[0m, in \u001b[0;36mApplication.iterate\u001b[0;34m(self, halt_before, halt_after, inputs)\u001b[0m\n\u001b[1;32m 1108\u001b[0m prior_action: Optional[Action] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 1109\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mhas_next_action():\n\u001b[1;32m 1110\u001b[0m \u001b[38;5;66;03m# self.step will only return None if there is no next action, so we can rely on tuple unpacking\u001b[39;00m\n\u001b[0;32m-> 1111\u001b[0m prior_action, result, state \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mstep\u001b[49m\u001b[43m(\u001b[49m\u001b[43minputs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minputs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 1112\u001b[0m \u001b[38;5;28;01myield\u001b[39;00m prior_action, result, state\n\u001b[1;32m 1113\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_should_halt_iterate(halt_before, halt_after, prior_action):\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:616\u001b[0m, in \u001b[0;36m_call_execute_method_pre_post.__call__.<locals>.wrapper_sync\u001b[0;34m(app_self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 614\u001b[0m exc \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[1;32m 615\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m--> 616\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfn\u001b[49m\u001b[43m(\u001b[49m\u001b[43mapp_self\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 617\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 618\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mcall_post(app_self, exc)\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:773\u001b[0m, in \u001b[0;36mApplication.step\u001b[0;34m(self, inputs)\u001b[0m\n\u001b[1;32m 770\u001b[0m \u001b[38;5;66;03m# we need to increment the sequence before we start computing\u001b[39;00m\n\u001b[1;32m 771\u001b[0m \u001b[38;5;66;03m# that way if we're replaying from state, we don't get stuck\u001b[39;00m\n\u001b[1;32m 772\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_increment_sequence_id()\n\u001b[0;32m--> 773\u001b[0m out \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_step\u001b[49m\u001b[43m(\u001b[49m\u001b[43minputs\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43minputs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m_run_hooks\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;28;43;01mTrue\u001b[39;49;00m\u001b[43m)\u001b[49m\n\u001b[1;32m 774\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m out\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:826\u001b[0m, in \u001b[0;36mApplication._step\u001b[0;34m(self, inputs, _run_hooks)\u001b[0m\n\u001b[1;32m 824\u001b[0m exc \u001b[38;5;241m=\u001b[39m e\n\u001b[1;32m 825\u001b[0m logger\u001b[38;5;241m.\u001b[39mexception(_format_BASE_ERROR_MESSAGE(next_action, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_state, inputs))\n\u001b[0;32m--> 826\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m e\n\u001b[1;32m 827\u001b[0m \u001b[38;5;28;01mfinally\u001b[39;00m:\n\u001b[1;32m 828\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m _run_hooks:\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:812\u001b[0m, in \u001b[0;36mApplication._step\u001b[0;34m(self, inputs, _run_hooks)\u001b[0m\n\u001b[1;32m 810\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m 811\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m next_action\u001b[38;5;241m.\u001b[39msingle_step:\n\u001b[0;32m--> 812\u001b[0m result, new_state \u001b[38;5;241m=\u001b[39m \u001b[43m_run_single_step_action\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 813\u001b[0m \u001b[43m \u001b[49m\u001b[43mnext_action\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_state\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43maction_inputs\u001b[49m\n\u001b[1;32m 814\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 815\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[1;32m 816\u001b[0m result \u001b[38;5;241m=\u001b[39m _run_function(\n\u001b[1;32m 817\u001b[0m next_action, \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_state, action_inputs, name\u001b[38;5;241m=\u001b[39mnext_action\u001b[38;5;241m.\u001b[39mname\n\u001b[1;32m 818\u001b[0m )\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/application.py:252\u001b[0m, in \u001b[0;36m_run_single_step_action\u001b[0;34m(action, state, inputs)\u001b[0m\n\u001b[1;32m 249\u001b[0m \u001b[38;5;66;03m# TODO -- guard all reads/writes with a subset of the state\u001b[39;00m\n\u001b[1;32m 250\u001b[0m action\u001b[38;5;241m.\u001b[39mvalidate_inputs(inputs)\n\u001b[1;32m 251\u001b[0m result, new_state \u001b[38;5;241m=\u001b[39m _adjust_single_step_output(\n\u001b[0;32m--> 252\u001b[0m \u001b[43maction\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrun_and_update\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43minputs\u001b[49m\u001b[43m)\u001b[49m, action\u001b[38;5;241m.\u001b[39mname, action\u001b[38;5;241m.\u001b[39mschema\n\u001b[1;32m 253\u001b[0m )\n\u001b[1;32m 254\u001b[0m _validate_result(result, action\u001b[38;5;241m.\u001b[39mname, action\u001b[38;5;241m.\u001b[39mschema)\n\u001b[1;32m 255\u001b[0m out \u001b[38;5;241m=\u001b[39m result, _state_update(state, new_state)\n",- "File \u001b[0;32m~/dagworks/burr/burr/core/action.py:639\u001b[0m, in \u001b[0;36mFunctionBasedAction.run_and_update\u001b[0;34m(self, state, **run_kwargs)\u001b[0m\n\u001b[1;32m 638\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mrun_and_update\u001b[39m(\u001b[38;5;28mself\u001b[39m, state: State, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mrun_kwargs) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m \u001b[38;5;28mtuple\u001b[39m[\u001b[38;5;28mdict\u001b[39m, State]:\n\u001b[0;32m--> 639\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_fn\u001b[49m\u001b[43m(\u001b[49m\u001b[43mstate\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_bound_params\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[38;5;241;43m*\u001b[39;49m\u001b[43mrun_kwargs\u001b[49m\u001b[43m)\u001b[49m\n",- "Cell \u001b[0;32mIn[1], line 94\u001b[0m, in \u001b[0;36mimage_response\u001b[0;34m(state, model)\u001b[0m\n\u001b[1;32m 91\u001b[0m \u001b[38;5;129m@action\u001b[39m(reads\u001b[38;5;241m=\u001b[39m[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprompt\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mchat_history\u001b[39m\u001b[38;5;124m\"\u001b[39m, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mmode\u001b[39m\u001b[38;5;124m\"\u001b[39m], writes\u001b[38;5;241m=\u001b[39m[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mresponse\u001b[39m\u001b[38;5;124m\"\u001b[39m])\n\u001b[1;32m 92\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mimage_response\u001b[39m(state: State, model: \u001b[38;5;28mstr\u001b[39m \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdall-e-2\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m State:\n\u001b[1;32m 93\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"Generates an image response to the prompt. Optional save function to save the image to a URL.\"\"\"\u001b[39;00m\n\u001b[0;32m---> 94\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mDemo error\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m 95\u001b[0m client \u001b[38;5;241m=\u001b[39m openai\u001b[38;5;241m.\u001b[39mClient()\n\u001b[1;32m 96\u001b[0m result \u001b[38;5;241m=\u001b[39m client\u001b[38;5;241m.\u001b[39mimages\u001b[38;5;241m.\u001b[39mgenerate(\n\u001b[1;32m 97\u001b[0m model\u001b[38;5;241m=\u001b[39mmodel, prompt\u001b[38;5;241m=\u001b[39mstate[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mprompt\u001b[39m\u001b[38;5;124m\"\u001b[39m], size\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m1024x1024\u001b[39m\u001b[38;5;124m\"\u001b[39m, quality\u001b[38;5;241m=\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstandard\u001b[39m\u001b[38;5;124m\"\u001b[39m, n\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m\n\u001b[1;32m 98\u001b[0m )\n",- "\u001b[0;31mValueError\u001b[0m: Demo error"+ "\u001B[0;31m---------------------------------------------------------------------------\u001B[0m",+ "\u001B[0;31mValueError\u001B[0m Traceback (most recent call last)",+ "Cell \u001B[0;32mIn[4], line 5\u001B[0m\n\u001B[1;32m 3\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mquit\u001B[39m\u001B[38;5;124m\"\u001B[39m \u001B[38;5;241m==\u001B[39m user_input\u001B[38;5;241m.\u001B[39mlower():\n\u001B[1;32m 4\u001B[0m \u001B[38;5;28;01mbreak\u001B[39;00m\n\u001B[0;32m----> 5\u001B[0m last_action, action_result, app_state \u001B[38;5;241m=\u001B[39m \u001B[43mapp\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrun\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 6\u001B[0m \u001B[43m \u001B[49m\u001B[43mhalt_after\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43m[\u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mresponse\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m]\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\n\u001B[1;32m 7\u001B[0m \u001B[43m \u001B[49m\u001B[43minputs\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43m{\u001B[49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[38;5;124;43mprompt\u001B[39;49m\u001B[38;5;124;43m\"\u001B[39;49m\u001B[43m:\u001B[49m\u001B[43m \u001B[49m\u001B[43muser_input\u001B[49m\u001B[43m}\u001B[49m\n\u001B[1;32m 8\u001B[0m \u001B[43m\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 9\u001B[0m last_message \u001B[38;5;241m=\u001B[39m app_state[\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mchat_history\u001B[39m\u001B[38;5;124m\"\u001B[39m][\u001B[38;5;241m-\u001B[39m\u001B[38;5;241m1\u001B[39m]\n\u001B[1;32m 10\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m last_message[\u001B[38;5;124m'\u001B[39m\u001B[38;5;124mtype\u001B[39m\u001B[38;5;124m'\u001B[39m] \u001B[38;5;241m==\u001B[39m \u001B[38;5;124m'\u001B[39m\u001B[38;5;124mimage\u001B[39m\u001B[38;5;124m'\u001B[39m:\n",+ "File \u001B[0;32m~/dagworks/burr/burr/telemetry.py:276\u001B[0m, in \u001B[0;36mcapture_function_usage.<locals>.wrapped_fn\u001B[0;34m(*args, **kwargs)\u001B[0m\n\u001B[1;32m 273\u001B[0m \u001B[38;5;129m@functools\u001B[39m\u001B[38;5;241m.\u001B[39mwraps(call_fn)\n\u001B[1;32m 274\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mwrapped_fn\u001B[39m(\u001B[38;5;241m*\u001B[39margs, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mkwargs):\n\u001B[1;32m 275\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m--> 276\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mcall_fn\u001B[49m\u001B[43m(\u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43margs\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43mkwargs\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 277\u001B[0m \u001B[38;5;28;01mfinally\u001B[39;00m:\n\u001B[1;32m 278\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m is_telemetry_enabled():\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:616\u001B[0m, in \u001B[0;36m_call_execute_method_pre_post.__call__.<locals>.wrapper_sync\u001B[0;34m(app_self, *args, **kwargs)\u001B[0m\n\u001B[1;32m 614\u001B[0m exc \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m\n\u001B[1;32m 615\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m--> 616\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mfn\u001B[49m\u001B[43m(\u001B[49m\u001B[43mapp_self\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43margs\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43mkwargs\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 617\u001B[0m \u001B[38;5;28;01mfinally\u001B[39;00m:\n\u001B[1;32m 618\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mcall_post(app_self, exc)\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:1168\u001B[0m, in \u001B[0;36mApplication.run\u001B[0;34m(self, halt_before, halt_after, inputs)\u001B[0m\n\u001B[1;32m 1166\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28;01mTrue\u001B[39;00m:\n\u001B[1;32m 1167\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m-> 1168\u001B[0m \u001B[38;5;28;43mnext\u001B[39;49m\u001B[43m(\u001B[49m\u001B[43mgen\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 1169\u001B[0m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mStopIteration\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[1;32m 1170\u001B[0m result \u001B[38;5;241m=\u001B[39m e\u001B[38;5;241m.\u001B[39mvalue\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:1111\u001B[0m, in \u001B[0;36mApplication.iterate\u001B[0;34m(self, halt_before, halt_after, inputs)\u001B[0m\n\u001B[1;32m 1108\u001B[0m prior_action: Optional[Action] \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m\n\u001B[1;32m 1109\u001B[0m \u001B[38;5;28;01mwhile\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mhas_next_action():\n\u001B[1;32m 1110\u001B[0m \u001B[38;5;66;03m# self.step will only return None if there is no next action, so we can rely on tuple unpacking\u001B[39;00m\n\u001B[0;32m-> 1111\u001B[0m prior_action, result, state \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mstep\u001B[49m\u001B[43m(\u001B[49m\u001B[43minputs\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43minputs\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 1112\u001B[0m \u001B[38;5;28;01myield\u001B[39;00m prior_action, result, state\n\u001B[1;32m 1113\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_should_halt_iterate(halt_before, halt_after, prior_action):\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:616\u001B[0m, in \u001B[0;36m_call_execute_method_pre_post.__call__.<locals>.wrapper_sync\u001B[0;34m(app_self, *args, **kwargs)\u001B[0m\n\u001B[1;32m 614\u001B[0m exc \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;01mNone\u001B[39;00m\n\u001B[1;32m 615\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[0;32m--> 616\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[43mfn\u001B[49m\u001B[43m(\u001B[49m\u001B[43mapp_self\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43margs\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43mkwargs\u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 617\u001B[0m \u001B[38;5;28;01mfinally\u001B[39;00m:\n\u001B[1;32m 618\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39mcall_post(app_self, exc)\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:773\u001B[0m, in \u001B[0;36mApplication.step\u001B[0;34m(self, inputs)\u001B[0m\n\u001B[1;32m 770\u001B[0m \u001B[38;5;66;03m# we need to increment the sequence before we start computing\u001B[39;00m\n\u001B[1;32m 771\u001B[0m \u001B[38;5;66;03m# that way if we're replaying from state, we don't get stuck\u001B[39;00m\n\u001B[1;32m 772\u001B[0m \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_increment_sequence_id()\n\u001B[0;32m--> 773\u001B[0m out \u001B[38;5;241m=\u001B[39m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_step\u001B[49m\u001B[43m(\u001B[49m\u001B[43minputs\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[43minputs\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43m_run_hooks\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;28;43;01mTrue\u001B[39;49;00m\u001B[43m)\u001B[49m\n\u001B[1;32m 774\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m out\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:826\u001B[0m, in \u001B[0;36mApplication._step\u001B[0;34m(self, inputs, _run_hooks)\u001B[0m\n\u001B[1;32m 824\u001B[0m exc \u001B[38;5;241m=\u001B[39m e\n\u001B[1;32m 825\u001B[0m logger\u001B[38;5;241m.\u001B[39mexception(_format_BASE_ERROR_MESSAGE(next_action, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_state, inputs))\n\u001B[0;32m--> 826\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m e\n\u001B[1;32m 827\u001B[0m \u001B[38;5;28;01mfinally\u001B[39;00m:\n\u001B[1;32m 828\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m _run_hooks:\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:812\u001B[0m, in \u001B[0;36mApplication._step\u001B[0;34m(self, inputs, _run_hooks)\u001B[0m\n\u001B[1;32m 810\u001B[0m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[1;32m 811\u001B[0m \u001B[38;5;28;01mif\u001B[39;00m next_action\u001B[38;5;241m.\u001B[39msingle_step:\n\u001B[0;32m--> 812\u001B[0m result, new_state \u001B[38;5;241m=\u001B[39m \u001B[43m_run_single_step_action\u001B[49m\u001B[43m(\u001B[49m\n\u001B[1;32m 813\u001B[0m \u001B[43m \u001B[49m\u001B[43mnext_action\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_state\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[43maction_inputs\u001B[49m\n\u001B[1;32m 814\u001B[0m \u001B[43m \u001B[49m\u001B[43m)\u001B[49m\n\u001B[1;32m 815\u001B[0m \u001B[38;5;28;01melse\u001B[39;00m:\n\u001B[1;32m 816\u001B[0m result \u001B[38;5;241m=\u001B[39m _run_function(\n\u001B[1;32m 817\u001B[0m next_action, \u001B[38;5;28mself\u001B[39m\u001B[38;5;241m.\u001B[39m_state, action_inputs, name\u001B[38;5;241m=\u001B[39mnext_action\u001B[38;5;241m.\u001B[39mname\n\u001B[1;32m 818\u001B[0m )\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/application.py:252\u001B[0m, in \u001B[0;36m_run_single_step_action\u001B[0;34m(action, state, inputs)\u001B[0m\n\u001B[1;32m 249\u001B[0m \u001B[38;5;66;03m# TODO -- guard all reads/writes with a subset of the state\u001B[39;00m\n\u001B[1;32m 250\u001B[0m action\u001B[38;5;241m.\u001B[39mvalidate_inputs(inputs)\n\u001B[1;32m 251\u001B[0m result, new_state \u001B[38;5;241m=\u001B[39m _adjust_single_step_output(\n\u001B[0;32m--> 252\u001B[0m \u001B[43maction\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mrun_and_update\u001B[49m\u001B[43m(\u001B[49m\u001B[43mstate\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43minputs\u001B[49m\u001B[43m)\u001B[49m, action\u001B[38;5;241m.\u001B[39mname, action\u001B[38;5;241m.\u001B[39mschema\n\u001B[1;32m 253\u001B[0m )\n\u001B[1;32m 254\u001B[0m _validate_result(result, action\u001B[38;5;241m.\u001B[39mname, action\u001B[38;5;241m.\u001B[39mschema)\n\u001B[1;32m 255\u001B[0m out \u001B[38;5;241m=\u001B[39m result, _state_update(state, new_state)\n",+ "File \u001B[0;32m~/dagworks/burr/burr/core/action.py:639\u001B[0m, in \u001B[0;36mFunctionBasedAction.run_and_update\u001B[0;34m(self, state, **run_kwargs)\u001B[0m\n\u001B[1;32m 638\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mrun_and_update\u001B[39m(\u001B[38;5;28mself\u001B[39m, state: State, \u001B[38;5;241m*\u001B[39m\u001B[38;5;241m*\u001B[39mrun_kwargs) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m \u001B[38;5;28mtuple\u001B[39m[\u001B[38;5;28mdict\u001B[39m, State]:\n\u001B[0;32m--> 639\u001B[0m \u001B[38;5;28;01mreturn\u001B[39;00m \u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_fn\u001B[49m\u001B[43m(\u001B[49m\u001B[43mstate\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;28;43mself\u001B[39;49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43m_bound_params\u001B[49m\u001B[43m,\u001B[49m\u001B[43m \u001B[49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[38;5;241;43m*\u001B[39;49m\u001B[43mrun_kwargs\u001B[49m\u001B[43m)\u001B[49m\n",+ "Cell \u001B[0;32mIn[1], line 94\u001B[0m, in \u001B[0;36mimage_response\u001B[0;34m(state, model)\u001B[0m\n\u001B[1;32m 91\u001B[0m \u001B[38;5;129m@action\u001B[39m(reads\u001B[38;5;241m=\u001B[39m[\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mprompt\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mchat_history\u001B[39m\u001B[38;5;124m\"\u001B[39m, \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mmode\u001B[39m\u001B[38;5;124m\"\u001B[39m], writes\u001B[38;5;241m=\u001B[39m[\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mresponse\u001B[39m\u001B[38;5;124m\"\u001B[39m])\n\u001B[1;32m 92\u001B[0m \u001B[38;5;28;01mdef\u001B[39;00m \u001B[38;5;21mimage_response\u001B[39m(state: State, model: \u001B[38;5;28mstr\u001B[39m \u001B[38;5;241m=\u001B[39m \u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mdall-e-2\u001B[39m\u001B[38;5;124m\"\u001B[39m) \u001B[38;5;241m-\u001B[39m\u001B[38;5;241m>\u001B[39m State:\n\u001B[1;32m 93\u001B[0m \u001B[38;5;250m \u001B[39m\u001B[38;5;124;03m\"\"\"Generates an image response to the prompt. Optional save function to save the image to a URL.\"\"\"\u001B[39;00m\n\u001B[0;32m---> 94\u001B[0m \u001B[38;5;28;01mraise\u001B[39;00m \u001B[38;5;167;01mValueError\u001B[39;00m(\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mDemo error\u001B[39m\u001B[38;5;124m\"\u001B[39m)\n\u001B[1;32m 95\u001B[0m client \u001B[38;5;241m=\u001B[39m openai\u001B[38;5;241m.\u001B[39mClient()\n\u001B[1;32m 96\u001B[0m result \u001B[38;5;241m=\u001B[39m client\u001B[38;5;241m.\u001B[39mimages\u001B[38;5;241m.\u001B[39mgenerate(\n\u001B[1;32m 97\u001B[0m model\u001B[38;5;241m=\u001B[39mmodel, prompt\u001B[38;5;241m=\u001B[39mstate[\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mprompt\u001B[39m\u001B[38;5;124m\"\u001B[39m], size\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124m1024x1024\u001B[39m\u001B[38;5;124m\"\u001B[39m, quality\u001B[38;5;241m=\u001B[39m\u001B[38;5;124m\"\u001B[39m\u001B[38;5;124mstandard\u001B[39m\u001B[38;5;124m\"\u001B[39m, n\u001B[38;5;241m=\u001B[39m\u001B[38;5;241m1\u001B[39m\n\u001B[1;32m 98\u001B[0m )\n",+ "\u001B[0;31mValueError\u001B[0m: Demo error"]}],diff --git a/examples/multi-modal-chatbot/notebook.ipynb b/examples/multi-modal-chatbot/notebook.ipynbindex d5fd937d..b836a2bb 100644--- a/examples/multi-modal-chatbot/notebook.ipynb+++ b/examples/multi-modal-chatbot/notebook.ipynb@@ -1,14 +1,34 @@{"cells": [{+ "metadata": {},"cell_type": "code",+ "outputs": [],"execution_count": null,- "id": "142d4e4f-af46-4353-bcb2-d802c8e04ec5",+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "d1d5e86fb8bcd92f"+ },+ {"metadata": {},+ "cell_type": "code","outputs": [],- "source": [- "!pip install burr[start]"- ]+ "execution_count": null,+ "source": "!pip install burr[start]",+ "id": "a1e0bae74e5d0d91"},{"cell_type": "markdown",diff --git a/examples/multi-modal-chatbot/requirements.txt b/examples/multi-modal-chatbot/requirements.txtindex 3ff3f0e5..3b8ae6d9 100644--- a/examples/multi-modal-chatbot/requirements.txt+++ b/examples/multi-modal-chatbot/requirements.txt@@ -1,2 +1,16 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+burr[streamlit,start]openaidiff --git a/examples/streaming-fastapi/notebook.ipynb b/examples/streaming-fastapi/notebook.ipynbindex 5bb50255..6da8dd8e 100644--- a/examples/streaming-fastapi/notebook.ipynb+++ b/examples/streaming-fastapi/notebook.ipynb@@ -1,14 +1,34 @@{"cells": [{+ "metadata": {},"cell_type": "code",+ "outputs": [],"execution_count": null,- "id": "1ce738e6-14b4-4892-9f2d-a1db94cfb29a",+ "source": [+ "# Copyright 2025 Apache Software Foundation\n",+ "#\n",+ "# Licensed under the Apache License, Version 2.0 (the \"License\");\n",+ "# you may not use this file except in compliance with the License.\n",+ "# You may obtain a copy of the License at\n",+ "#\n",+ "# http://www.apache.org/licenses/LICENSE-2.0\n",+ "#\n",+ "# Unless required by applicable law or agreed to in writing, software\n",+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",+ "# See the License for the specific language governing permissions and\n",+ "# limitations under the License."+ ],+ "id": "8b8a0b32aa99226c"+ },+ {"metadata": {},+ "cell_type": "code","outputs": [],- "source": [- "!pip install burr[start]"- ]+ "execution_count": null,+ "source": "!pip install burr[start]",+ "id": "5e46f9824f7c180a"},{"cell_type": "markdown",diff --git a/scripts/release_helper.py b/scripts/release_helper.pyindex 23a7d896..ce1a7df1 100644--- a/scripts/release_helper.py+++ b/scripts/release_helper.py@@ -327,9 +327,12 @@ Checklist for reference:[ ] Download links are valid.[ ] Checksums and signatures.[ ] LICENSE/NOTICE files exist-[ ] No unexpected binary files+[ ] LICENSE/NOTICE files exist in convenience packages+[ ] No unexpected binary files in source+[ ] No unexpected binary files in convenience packages[ ] All source files have ASF headers[ ] Can compile from source+[ ] Build script recreates convenience packages (contents need to match)On behalf of the Apache {PROJECT_SHORT_NAME} PPMC,[Your Name]diff --git a/setup.cfg b/setup.cfgindex bc5f20b6..57d5725f 100644--- a/setup.cfg+++ b/setup.cfg@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+[flake8]max-line-length = 100exclude = build/,.git/,venv/diff --git a/telemetry/ui/.eslintignore b/telemetry/ui/.eslintignoreindex e1a5ee73..23d9c03c 100644--- a/telemetry/ui/.eslintignore+++ b/telemetry/ui/.eslintignore@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+build/*tailwind.config.js.eslintrc.jsdiff --git a/telemetry/ui/.prettierignore b/telemetry/ui/.prettierignoreindex b0d61293..8014b78c 100644--- a/telemetry/ui/.prettierignore+++ b/telemetry/ui/.prettierignore@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+build/*tailwind.config.js.eslitrc.jsdiff --git a/telemetry/ui/public/robots.txt b/telemetry/ui/public/robots.txtindex e9e57dc4..941863d9 100644--- a/telemetry/ui/public/robots.txt+++ b/telemetry/ui/public/robots.txt@@ -1,3 +1,17 @@+# Copyright 2025 Apache Software Foundation+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.+# https://www.robotstxt.org/robotstxt.htmlUser-agent: *Disallow: