Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion .style.yapf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache Burr (Incubating)
Copyright 2025 The Apache Software Foundation
Copyright 2026 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions examples/deep-researcher/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down Expand Up @@ -180,7 +180,7 @@
"source": [
"## Deep Researcher\n",
"\n",
"This is an example of a research assistant agent that uses llm chat and llm-friendly search together to provide a report, complete with internet citations, on a topic of the user's choosing. The graph for the agent includes optional reflection and re-writing that is implemented as a loop. This particular version of a research assistant uses the OpenAI API code for chat and the Tavily API for search. \n",
"This is an example of a research assistant agent that uses llm chat and llm-friendly search together to provide a report, complete with internet citations, on a topic of the user's choosing. The graph for the agent includes optional reflection and re-writing that is implemented as a loop. This particular version of a research assistant uses the OpenAI API code for chat and the Tavily API for search.\n",
"\n",
"Given a research topic, the research assistant flow consists of several steps. On initialization, the assistant must:\n",
"\n",
Expand All @@ -197,7 +197,7 @@
"5. Finalize summary with formatted sources and return it to the user.\n",
"\n",
"The graph for the application is visualized below.\n",
" \n"
"\n"
]
},
{
Expand Down Expand Up @@ -364,7 +364,7 @@
"source": [
"my_research_topic = \"getting a job in datascience\"\n",
"action, state, result = app.run(halt_after=[\"finalize_summary\"], inputs={\"research_topic\": my_research_topic})\n",
"print(app.state[\"running_summary\"]) "
"print(app.state[\"running_summary\"])"
]
},
{
Expand All @@ -384,7 +384,7 @@
"source": [
"my_research_topic = \"how to get started with canning food at home\"\n",
"action, state, result = app.run(halt_after=[\"finalize_summary\"], inputs={\"research_topic\": my_research_topic})\n",
"print(app.state[\"running_summary\"]) "
"print(app.state[\"running_summary\"])"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/deep-researcher/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
16 changes: 8 additions & 8 deletions examples/email-assistant/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down Expand Up @@ -57,15 +57,15 @@
"source": [
"# The Application\n",
"\n",
"We're modeling this as a multi-shot model. No sane person would trust GPT-x to respond on their behalf, \n",
"We're modeling this as a multi-shot model. No sane person would trust GPT-x to respond on their behalf,\n",
"but it can be quite valuable in helping automate the process of responding to an email and deciding how to respond.\n",
"There are a few interaction points:\n",
"\n",
"1. Initially, the user provides an email and response instructions (note this should probably be changed to be a chain of emails)\n",
"2. The LLM has the option to ask a set of clarifying questions that the user can then respond to\n",
"3. The user then provides feedback. If feedback is empty, the LLM will return a result\n",
"\n",
"This demonstrates how to use Burr to move in/out of more complex flows. \n",
"This demonstrates how to use Burr to move in/out of more complex flows.\n",
"\n",
"First, we instantiate/visualize the application. To see the code, see [application.py](application.py)."
]
Expand Down Expand Up @@ -146,9 +146,9 @@
"Regards,\n",
"Someone\"\"\"\n",
"\n",
"INSTRUCTIONS = \"\"\"I get a bunch of these emails and usually ignore them. I don't want to pay \n",
"(or really engage) but I want to see if they can help promote our tooling, \n",
"particularly the OS libraries Hamilton and Burr, which are tools for AI practitioners. \n",
"INSTRUCTIONS = \"\"\"I get a bunch of these emails and usually ignore them. I don't want to pay\n",
"(or really engage) but I want to see if they can help promote our tooling,\n",
"particularly the OS libraries Hamilton and Burr, which are tools for AI practitioners.\n",
"Let's see if we can turn this cold-call around.\n",
"\"\"\""
]
Expand Down Expand Up @@ -200,7 +200,7 @@
"\n",
"def request_feedback(draft):\n",
" \"\"\"Requests feedback from the user for a draft\"\"\"\n",
" print( \n",
" print(\n",
" f\"here's a draft!: \\n {draft} \\n \\n What feedback do you have?\",\n",
" \"If you have no feedback then we'll finish it up.\"\n",
" )\n",
Expand All @@ -212,7 +212,7 @@
"}\n",
"while True:\n",
" action, result, state = app.run(\n",
" halt_before=[\"clarify_instructions\", \"process_feedback\"], \n",
" halt_before=[\"clarify_instructions\", \"process_feedback\"],\n",
" halt_after=[\"final_result\"],\n",
" inputs=inputs\n",
" )\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/email-assistant/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world-counter/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down
24 changes: 12 additions & 12 deletions examples/multi-modal-chatbot/burr_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down Expand Up @@ -123,7 +123,7 @@
"import copy\n",
"\n",
"from IPython.display import Image, display\n",
"from IPython.core.display import HTML \n",
"from IPython.core.display import HTML\n",
"import openai\n",
"\n",
"from burr.core import ApplicationBuilder, State, default, graph, when\n",
Expand Down Expand Up @@ -190,7 +190,7 @@
"def chat_response(\n",
" state: State, prepend_prompt: str, model: str = \"gpt-3.5-turbo\"\n",
") -> State:\n",
" \n",
"\n",
" chat_history = copy.deepcopy(state[\"chat_history\"])\n",
" chat_history[-1][\"content\"] = f\"{prepend_prompt}: {chat_history[-1]['content']}\"\n",
" chat_history_api_format = [\n",
Expand Down Expand Up @@ -409,7 +409,7 @@
"base_graph = (\n",
" graph.GraphBuilder()\n",
" .with_actions(\n",
" # these are the \"nodes\" \n",
" # these are the \"nodes\"\n",
" prompt=process_prompt,\n",
" decide_mode=choose_mode,\n",
" generate_image=image_response,\n",
Expand Down Expand Up @@ -635,8 +635,8 @@
" ApplicationBuilder()\n",
" .with_graph(base_graph)\n",
" .initialize_from(\n",
" tracker, \n",
" resume_at_next_action=True, \n",
" tracker,\n",
" resume_at_next_action=True,\n",
" default_state={\"chat_history\": []},\n",
" default_entrypoint=\"prompt\",\n",
" )\n",
Expand Down Expand Up @@ -744,7 +744,7 @@
" if \"quit\" == user_input.lower():\n",
" break\n",
" last_action, action_result, app_state = app.run(\n",
" halt_after=[\"response\"], \n",
" halt_after=[\"response\"],\n",
" inputs={\"prompt\": user_input}\n",
" )\n",
" last_message = app_state[\"chat_history\"][-1]\n",
Expand Down Expand Up @@ -796,7 +796,7 @@
" .with_graph(base_graph)\n",
" .initialize_from(\n",
" tracker,\n",
" resume_at_next_action=True, \n",
" resume_at_next_action=True,\n",
" default_state={\"chat_history\": []},\n",
" default_entrypoint=\"prompt\",\n",
" )\n",
Expand Down Expand Up @@ -868,7 +868,7 @@
" if \"quit\" == user_input.lower():\n",
" break\n",
" last_action, action_result, app_state = resumed_app.run(\n",
" halt_after=[\"response\"], \n",
" halt_after=[\"response\"],\n",
" inputs={\"prompt\": user_input}\n",
" )\n",
" last_message = app_state[\"chat_history\"][-1]\n",
Expand Down Expand Up @@ -917,7 +917,7 @@
" .with_graph(base_graph) # this could be different...\n",
" .initialize_from(\n",
" tracker,\n",
" resume_at_next_action=True, \n",
" resume_at_next_action=True,\n",
" default_state={\"chat_history\": []},\n",
" default_entrypoint=\"prompt\",\n",
" fork_from_app_id=app_id,\n",
Expand Down Expand Up @@ -997,7 +997,7 @@
" if \"quit\" == user_input.lower():\n",
" break\n",
" last_action, action_result, app_state = forked_app.run(\n",
" halt_after=[\"response\"], \n",
" halt_after=[\"response\"],\n",
" inputs={\"prompt\": user_input}\n",
" )\n",
" last_message = app_state[\"chat_history\"][-1]\n",
Expand All @@ -1021,7 +1021,7 @@
"\n",
"[Time Travel blog post & video:](https://blog.dagworks.io/p/travel-back-in-time-with-burr)\n",
"\n",
"<a href=\"https://www.youtube.com/embed/98vxhIcE6NI?si=oV1BbSUCKa1UvX5P\"><img src=\"https://img.youtube.com/vi/98vxhIcE6NI/0.jpg\"> \n",
"<a href=\"https://www.youtube.com/embed/98vxhIcE6NI?si=oV1BbSUCKa1UvX5P\"><img src=\"https://img.youtube.com/vi/98vxhIcE6NI/0.jpg\">\n",
"</img>\n",
"<a href=\"https://www.youtube.com/embed/98vxhIcE6NI?si=oV1BbSUCKa1UvX5P\">\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/multi-modal-chatbot/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down
2 changes: 1 addition & 1 deletion examples/multi-modal-chatbot/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
6 changes: 3 additions & 3 deletions examples/streaming-fastapi/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outputs": [],
"execution_count": null,
"source": [
"# Copyright 2025 Apache Software Foundation\n",
"# Copyright 2026 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",
Expand Down Expand Up @@ -48,7 +48,7 @@
"You can view this demo in your app by running Burr:\n",
"\n",
"```bash\n",
"burr \n",
"burr\n",
"```\n",
"\n",
"This will open a browser on [http://localhost:7241](http://localhost:7241)\n",
Expand Down Expand Up @@ -288,7 +288,7 @@
"# Calling the application\n",
"\n",
"With async streaming, we get back an `AsyncStreamingResultContainer`. This allows us to get partial results streaming in, while also allowing us to get the full result.\n",
"In the following case, we just "
"In the following case, we just"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion telemetry/ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion telemetry/ui/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
2 changes: 1 addition & 1 deletion telemetry/ui/public/robots.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2025 Apache Software Foundation
# Copyright 2026 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.
Expand Down
Loading