Skip to content

Commit

Permalink
Merge pull request #2235 from jupyter-naas/master
Browse files Browse the repository at this point in the history
Merge master
  • Loading branch information
FlorentLvr authored Sep 28, 2023
2 parents bfbe786 + 3fe2928 commit 5f414ef
Show file tree
Hide file tree
Showing 13 changed files with 1,509 additions and 485 deletions.
48 changes: 24 additions & 24 deletions .github/push_templates_to_algolia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"id": "aa0e3e6f-1260-4452-8abf-7c084e26c8a4",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:39.668727Z",
"iopub.status.busy": "2023-09-25T16:32:39.668204Z",
"iopub.status.idle": "2023-09-25T16:32:39.735113Z",
"shell.execute_reply": "2023-09-25T16:32:39.734275Z"
"iopub.execute_input": "2023-09-27T16:17:57.322553Z",
"iopub.status.busy": "2023-09-27T16:17:57.322243Z",
"iopub.status.idle": "2023-09-27T16:17:57.383308Z",
"shell.execute_reply": "2023-09-27T16:17:57.382547Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -95,10 +95,10 @@
"id": "cfa97168-63eb-4e8c-89c3-0a5d26f47740",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:39.739558Z",
"iopub.status.busy": "2023-09-25T16:32:39.738972Z",
"iopub.status.idle": "2023-09-25T16:32:39.743419Z",
"shell.execute_reply": "2023-09-25T16:32:39.742633Z"
"iopub.execute_input": "2023-09-27T16:17:57.387519Z",
"iopub.status.busy": "2023-09-27T16:17:57.387106Z",
"iopub.status.idle": "2023-09-27T16:17:57.391322Z",
"shell.execute_reply": "2023-09-27T16:17:57.390625Z"
},
"papermill": {},
"tags": []
Expand Down Expand Up @@ -141,10 +141,10 @@
"id": "7a9c86c2-931d-4113-abbc-31b3f517b6c4",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:39.748100Z",
"iopub.status.busy": "2023-09-25T16:32:39.747589Z",
"iopub.status.idle": "2023-09-25T16:32:39.766737Z",
"shell.execute_reply": "2023-09-25T16:32:39.765358Z"
"iopub.execute_input": "2023-09-27T16:17:57.394722Z",
"iopub.status.busy": "2023-09-27T16:17:57.394291Z",
"iopub.status.idle": "2023-09-27T16:17:57.409632Z",
"shell.execute_reply": "2023-09-27T16:17:57.408799Z"
},
"tags": []
},
Expand Down Expand Up @@ -178,10 +178,10 @@
"id": "c50e96b2-4403-413c-a99a-9243be0c0a04",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:39.771332Z",
"iopub.status.busy": "2023-09-25T16:32:39.770890Z",
"iopub.status.idle": "2023-09-25T16:32:40.633978Z",
"shell.execute_reply": "2023-09-25T16:32:40.632283Z"
"iopub.execute_input": "2023-09-27T16:17:57.413890Z",
"iopub.status.busy": "2023-09-27T16:17:57.413490Z",
"iopub.status.idle": "2023-09-27T16:17:58.236093Z",
"shell.execute_reply": "2023-09-27T16:17:58.235038Z"
},
"tags": []
},
Expand Down Expand Up @@ -230,10 +230,10 @@
"id": "da661ba3-fd15-4abc-bd4f-d13ae77b82b0",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:40.640901Z",
"iopub.status.busy": "2023-09-25T16:32:40.640216Z",
"iopub.status.idle": "2023-09-25T16:32:41.707181Z",
"shell.execute_reply": "2023-09-25T16:32:41.706187Z"
"iopub.execute_input": "2023-09-27T16:17:58.240293Z",
"iopub.status.busy": "2023-09-27T16:17:58.239626Z",
"iopub.status.idle": "2023-09-27T16:17:59.283387Z",
"shell.execute_reply": "2023-09-27T16:17:59.282561Z"
},
"tags": []
},
Expand All @@ -260,10 +260,10 @@
"id": "f1482a8f-4ce5-4e04-93c8-ddd883375d67",
"metadata": {
"execution": {
"iopub.execute_input": "2023-09-25T16:32:41.711584Z",
"iopub.status.busy": "2023-09-25T16:32:41.711038Z",
"iopub.status.idle": "2023-09-25T16:32:41.733218Z",
"shell.execute_reply": "2023-09-25T16:32:41.732420Z"
"iopub.execute_input": "2023-09-27T16:17:59.287766Z",
"iopub.status.busy": "2023-09-27T16:17:59.287011Z",
"iopub.status.idle": "2023-09-27T16:17:59.308812Z",
"shell.execute_reply": "2023-09-27T16:17:59.308068Z"
},
"tags": []
},
Expand Down
97 changes: 51 additions & 46 deletions HubSpot/HubSpot_Chat_about_a_deal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,9 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"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 Down Expand Up @@ -217,10 +210,40 @@
"cell_type": "code",
"execution_count": null,
"id": "417800b9-5c16-4911-8f73-f62cd436ed33",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"system_prompt = \"Act as a Sales Agent expert in analyzing conversations and extracting action items.\""
"system_prompt = '''Act as a Sales Assistant expert working in analyzing conversations and extracting action items.\n",
"Start presenting yourself and tell the user they can do the slash command /HubSpot_Get_deal_summary to query deal notes, meetings, calls. \n",
"Once you have this information, you can start list action items based on MEDDIC sales techniques. \n",
"Each new deal you get from that command should be presented as follows: \n",
"\n",
"MEDDIC Analysis: \n",
"\n",
"1/ Metric: The economic impact of the solution is...\n",
"\n",
"2/ Economic Buyer: The person with the budget is...\n",
"\n",
"3/ Decision Criteria: The formal criteria used to compare vendor's offering in terms of: \n",
"- Capabilities is...\n",
"- Vendor info is...\n",
"- Return on investment is... \n",
"\n",
"4/ Decision Process: The events and timeline in the validation and approval process is...\n",
"\n",
"5/ Identify Pain: The pain is... It impacts the following KPIs: \n",
"- KPI 1: \n",
"- KPI 2: \n",
"- KPI 3: \n",
"\n",
"The compelling event attached is that...\n",
"\n",
"The cost of doing nothing is...\n",
"\n",
"6/ Champion: The key player who has the power and influence in driving the opportunity and who can sell on our behalf is...\n",
"'''"
]
},
{
Expand All @@ -245,8 +268,8 @@
},
"outputs": [],
"source": [
"message = f\"\"\"Now please present the deal: [URL] and list action items clearly and concisely.\n",
"\n",
"message = f\"\"\"Here is the deal URL: [URL].\n",
"Here are all the activities:\n",
"[ACTIVITIES]\n",
"\"\"\""
]
Expand Down Expand Up @@ -559,7 +582,9 @@
"cell_type": "code",
"execution_count": null,
"id": "a31b28d2-c12d-4704-80ee-dd08cc40afca",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"commands = [\n",
Expand Down Expand Up @@ -602,7 +627,7 @@
},
"outputs": [],
"source": [
"plugin_path = naas_chat_plugin.create_plugin(\n",
"plugin_file_path = naas_chat_plugin.create_plugin(\n",
" name=plugin_name,\n",
" prompt=system_prompt,\n",
" model='gpt-3.5-turbo-16k',\n",
Expand All @@ -613,68 +638,48 @@
},
{
"cell_type": "markdown",
"id": "1f3da962-f7f1-45d2-83f6-6c1ef2f87e6f",
"id": "ac13135d-c190-4fb3-95ce-eee43ad0f83f",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Create naas asset\n",
"### Create 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."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6b7daf0f-dcfc-4206-9d71-f11ae9448041",
"id": "9d6fcbc0-32f8-42ff-b629-344f456e1645",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"plugin_url = naas.asset.add(plugin_path, params={\"inline\": True})"
"plugin_url = naas.asset.add(plugin_file_path, params={\"inline\": True})"
]
},
{
"cell_type": "markdown",
"id": "759a2dfb-5648-49ea-a025-c905fd369b40",
"id": "d6640dc8-1806-4bb8-a919-62fa8e2d80f6",
"metadata": {},
"source": [
"### Use your plugin in Naas Chat"
"### Create new chat\n",
"You don't need to click on 'Create New Chat' everytime you update your system prompt, you can use the command `/refresh`."
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "9177e81e-63b4-4438-ae5d-dee0ba2081f8",
"execution_count": null,
"id": "673518f4-0ae4-4f2f-809c-a8e187736b78",
"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})\")"
"outputs": [],
"source": [
"Markdown(f\"[Create New Chat](https://naas.ai/chat/use?plugin_url={plugin_url})\")"
]
}
],
Expand Down
Loading

0 comments on commit 5f414ef

Please sign in to comment.