blob: 8ebcbef0ecafbfb115c5bb7484c3d0a5ebe293a1 [file] [log] [blame]
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "142d4e4f-af46-4353-bcb2-d802c8e04ec5",
"metadata": {},
"outputs": [],
"source": [
"!pip install burr"
]
},
{
"cell_type": "markdown",
"id": "0ebb856d-fdb0-412c-8eaf-27af91a35ce3",
"metadata": {},
"source": [
"# Simple Multi-Modal chatbot\n",
"\n",
"This runs through an example of a multi-modal chatbot. Follow in the [application.py] file for specific implementation."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "89b22472-8074-4adb-9d19-fcbaf8cd94c2",
"metadata": {},
"outputs": [],
"source": [
"from application import application as multi_modal_chatbot"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "84068205-605f-45c8-9b2e-5a3f787d598a",
"metadata": {},
"outputs": [],
"source": [
"app = multi_modal_chatbot()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0b21d035-ec45-4606-b3d7-e4dfd0266a47",
"metadata": {},
"outputs": [],
"source": [
"app.visualize(include_conditions=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "923beb31-3abf-4511-9f86-007a46734f21",
"metadata": {},
"outputs": [],
"source": [
"action, result, state = app.run(halt_after=[\"response\"], inputs={\"prompt\" : \"please draw a turtle\"})\n",
"print(result)"
]
},
{
"cell_type": "markdown",
"id": "de4ca6ad-2eeb-4ba5-8bad-df807546c848",
"metadata": {},
"source": [
"# Viewing in UI\n",
"\n",
"The following cell gives you a link to the prior run in the UI. If you have not yet, run `burr` in your terminal to start the local tracking server."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "84e812d2-9a40-4bcb-a031-4e3ab7d4ca1c",
"metadata": {},
"outputs": [],
"source": [
"from IPython.display import Markdown\n",
"url = f\"[Link to UI](http://localhost:7241/project/demo:chatbot/{app.uid})\"\n",
"Markdown(url)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}