Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Fixes for Burr demo for installation

elijahbenizzy37a36607ba80
diff --git a/examples/gpt/application.py b/examples/gpt/application.py
index 10f732cf..a15df955 100644
--- a/examples/gpt/application.py
+++ b/examples/gpt/application.py
@@ -40,8 +40,8 @@ def choose_mode(state: State) -> Tuple[dict, State]:
prompt = (
f"You are a chatbot. You've been prompted this: {state['prompt']}. "
f"You have the capability of responding in the following modes: {', '.join(MODES)}. "
- "Please respond with *only* a single word representing the mode that most accurately"
- " corresponds to the prompt. Fr instance, if the prompt is 'draw a picture of a cat', "
+ "Please respond with *only* a single word representing the mode that most accurately "
+ "corresponds to the prompt. Fr instance, if the prompt is 'draw a picture of a cat', "
"the mode would be 'generate_image'. If the prompt is 'what is the capital of France', the mode would be 'answer_question'."
"If none of these modes apply, please respond with 'unknown'."
)
@@ -65,8 +65,7 @@ def choose_mode(state: State) -> Tuple[dict, State]:
def prompt_for_more(state: State) -> Tuple[dict, State]:
result = {
"response": {
- "content": f"None of the response modes I support: ({','.join(MODES)}) "
- f"apply to your question. Please clarify?",
+ "content": "None of the response modes I support apply to your question. Please clarify?",
"type": "text",
"role": "assistant",
}
diff --git a/examples/gpt/streamlit_app.py b/examples/gpt/streamlit_app.py
index 4185a0c0..913ae758 100644
--- a/examples/gpt/streamlit_app.py
+++ b/examples/gpt/streamlit_app.py
@@ -14,10 +14,10 @@ from burr.integrations.streamlit import (
st.set_page_config(layout="wide")
-"""This file is a work in progress. Note that this will be replaced shortly
-with a simple chatbot + a reference to the Burr UI (to be run in a separate page),
-which is more powerful and much simpler to understand. For now,
-this is purely for demos."""
+st.markdown(
+ "This is a prototype of the streamlit app -- we've left around a UI for demonstration purposes, but you can"
+ " run the real UI by running `burr` -- a window will pop up and you can follow the results live!"
+)
def render_chat_message(record: Record):