Adding signals & queries to the basic Bedrock sample. Starts a workflow with a prompt, allows follow-up prompts to be given using Temporal signals, and allows the conversation history to be queried using Temporal queries.
To run, first see samples-python
README.md, and bedrock
README.md for prerequisites specific to this sample. Once set up, run the following from this directory:
-
Run the worker:
poetry run python run_worker.py
-
In another terminal run the client with a prompt.
Example:
poetry run python send_message.py 'What animals are marsupials?'
-
View the worker's output for the response.
-
Give followup prompts by signaling the workflow.
Example:
poetry run python send_message.py 'Do they lay eggs?'
-
Get the conversation history by querying the workflow.
Example:
poetry run python get_history.py
-
The workflow will timeout after inactivity.