Skip to content

Commit acbeff5

Browse files
Update README.md (#508)
* Update README.md Fixes inconsistencies in the REAMDE example
1 parent 6a49eeb commit acbeff5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,15 @@ from burr.core import action, State, ApplicationBuilder
7373

7474
@action(reads=[], writes=["prompt", "chat_history"])
7575
def human_input(state: State, prompt: str) -> State:
76-
# your code -- write what you want here!
76+
# your code -- write what you want here, for example
77+
chat_item = {"role" : "user", "content" : prompt}
7778
return state.update(prompt=prompt).append(chat_history=chat_item)
7879

7980
@action(reads=["chat_history"], writes=["response", "chat_history"])
8081
def ai_response(state: State) -> State:
82+
# query the LLM however you want (or don't use an LLM, up to you...)
8183
response = _query_llm(state["chat_history"]) # Burr doesn't care how you use LLMs!
84+
chat_item = {"role" : "system", "content" : response}
8285
return state.update(response=content).append(chat_history=chat_item)
8386

8487
app = (

0 commit comments

Comments
 (0)