Skip to content

Commit

Permalink
feat: add markdown display
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Sep 27, 2023
1 parent f1dd75e commit 954e1fa
Showing 1 changed file with 46 additions and 23 deletions.
69 changes: 46 additions & 23 deletions HubSpot/HubSpot_Chat_about_a_deal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "02522295-f0cc-4524-93fb-2b2ab5ac480e",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-27T07:20:45.302425Z",
"iopub.status.busy": "2023-09-27T07:20:45.302073Z",
"iopub.status.idle": "2023-09-27T07:21:04.211357Z",
"shell.execute_reply": "2023-09-27T07:21:04.210751Z",
"shell.execute_reply.started": "2023-09-27T07:20:45.302333Z"
},
"papermill": {},
"tags": []
},
Expand All @@ -91,11 +98,10 @@
"import requests\n",
"import naas\n",
"import naas_drivers\n",
"if naas_drivers.__version__ != '0.115.0':\n",
" !pip install naas_drivers --update --user\n",
"from naas_drivers import hubspot, naas_chat_plugin\n",
"import pandas as pd\n",
"import os\n",
"from IPython.display import Markdown\n",
"pd.set_option('display.max_colwidth', None)"
]
},
Expand Down Expand Up @@ -576,13 +582,14 @@
},
{
"cell_type": "markdown",
"id": "f876c2a1-116f-49d1-bc97-68dd49ed65b1",
"id": "5fc799c1-b224-4df5-9894-0f8273ee29bd",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Generate plugin"
"### Generate plugin\n",
"This function will generate the plugin in JSON format and also verify if your prompt adheres to the recommended limit, which is set at 20% of the maximum tokens allowed by the model. Then, it will save your plugin in your local environment."
]
},
{
Expand All @@ -606,13 +613,14 @@
},
{
"cell_type": "markdown",
"id": "713397d3-0479-4a45-9517-9d52d003b2b6",
"id": "1f3da962-f7f1-45d2-83f6-6c1ef2f87e6f",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Create asset"
"### Create naas asset\n",
"This asset can be utilized by using the command `/use` in your Naas Chat or by simply clicking on the link provided in the cell below."
]
},
{
Expand All @@ -630,29 +638,44 @@
},
{
"cell_type": "markdown",
"id": "3a996f93-22ec-4342-a45a-b24246f318dc",
"id": "759a2dfb-5648-49ea-a025-c905fd369b40",
"metadata": {},
"source": [
"### Go to your Chat"
"### Use your plugin in Naas Chat"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "27750667-efeb-48ee-9276-f38d8a6c9a87",
"metadata": {},
"outputs": [],
"source": [
"print(f\"https://naas.ai/chat/use?plugin_url={plugin_url}\")"
"execution_count": 10,
"id": "9177e81e-63b4-4438-ae5d-dee0ba2081f8",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-27T11:20:06.967728Z",
"iopub.status.busy": "2023-09-27T11:20:06.967499Z",
"iopub.status.idle": "2023-09-27T11:20:06.972172Z",
"shell.execute_reply": "2023-09-27T11:20:06.971494Z",
"shell.execute_reply.started": "2023-09-27T11:20:06.967705Z"
},
"tags": []
},
"outputs": [
{
"data": {
"text/markdown": [
"[Go To Naas Chat](https://naas.ai/chat/use?plugin_url=https://public.naas.ai/ZmxvcmVudC00MG5hYXMtMkVhaQ==/asset/303d69be3038ad9409f9663f90615f036fd329846a8ddb5d6a2f27dd0f0e)"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Markdown(f\"[Go To Naas Chat](https://naas.ai/chat/use?plugin_url={plugin_url})\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bec1605a-7461-4fdc-8a62-0af8a157e68a",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 954e1fa

Please sign in to comment.