diff --git a/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb index c209f59..a1aef62 100644 --- a/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb +++ b/notebooks/how-to-build-llm-apps-that-can-see-hear-speak/notebook.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "", + "id": "7a9ad04b-150f-450f-828c-80caaf8a538f", "metadata": {}, "source": [ "
\n", @@ -19,7 +19,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "
\n", @@ -34,7 +33,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -46,7 +44,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -64,7 +61,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -75,7 +71,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "Create and use the database llm_webinar" @@ -84,7 +79,6 @@ { "cell_type": "code", "execution_count": 1, - "id": "", "metadata": {}, "outputs": [ { @@ -106,7 +100,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "
\n", @@ -121,7 +114,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "Create tables" @@ -130,7 +122,6 @@ { "cell_type": "code", "execution_count": 2, - "id": "", "metadata": {}, "outputs": [ { @@ -251,7 +242,6 @@ { "cell_type": "code", "execution_count": 3, - "id": "", "metadata": {}, "outputs": [ { @@ -272,7 +262,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -283,7 +272,6 @@ { "cell_type": "code", "execution_count": 4, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -293,7 +281,6 @@ { "cell_type": "code", "execution_count": 5, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -316,7 +303,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Set API keys" @@ -325,7 +311,6 @@ { "cell_type": "code", "execution_count": 6, - "id": "", "metadata": {}, "outputs": [ { @@ -343,7 +328,6 @@ { "cell_type": "code", "execution_count": 7, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -359,7 +343,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -370,7 +353,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Bring past two months of stock data" @@ -379,7 +361,6 @@ { "cell_type": "code", "execution_count": 8, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -391,7 +372,6 @@ { "cell_type": "code", "execution_count": 9, - "id": "", "metadata": {}, "outputs": [ { @@ -482,7 +462,6 @@ { "cell_type": "code", "execution_count": 10, - "id": "", "metadata": {}, "outputs": [ { @@ -503,7 +482,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "## Bring in Company data" @@ -512,7 +490,6 @@ { "cell_type": "code", "execution_count": 11, - "id": "", "metadata": {}, "outputs": [ { @@ -710,7 +687,6 @@ { "cell_type": "code", "execution_count": 12, - "id": "", "metadata": {}, "outputs": [ { @@ -731,7 +707,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "## Bring in news sentiment" @@ -740,7 +715,6 @@ { "cell_type": "code", "execution_count": 13, - "id": "", "metadata": {}, "outputs": [ { @@ -842,7 +816,6 @@ { "cell_type": "code", "execution_count": 14, - "id": "", "metadata": {}, "outputs": [ { @@ -863,7 +836,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -874,7 +846,6 @@ { "cell_type": "code", "execution_count": 15, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -949,7 +920,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Create function that processes user question with a check in Semantic Cache Layer" @@ -958,7 +928,6 @@ { "cell_type": "code", "execution_count": 16, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -1077,7 +1046,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Test on two similar questions" @@ -1086,7 +1054,6 @@ { "cell_type": "code", "execution_count": 17, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -1099,7 +1066,6 @@ { "cell_type": "code", "execution_count": 18, - "id": "", "metadata": {}, "outputs": [ { @@ -1127,7 +1093,6 @@ { "cell_type": "code", "execution_count": 19, - "id": "", "metadata": {}, "outputs": [ { @@ -1148,7 +1113,6 @@ { "cell_type": "code", "execution_count": 20, - "id": "", "metadata": {}, "outputs": [ { @@ -1166,7 +1130,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -1177,7 +1140,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Select a voice" @@ -1186,7 +1148,6 @@ { "cell_type": "code", "execution_count": 21, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -1200,7 +1161,6 @@ { "cell_type": "code", "execution_count": 22, - "id": "", "metadata": {}, "outputs": [ { @@ -1220,7 +1180,6 @@ { "cell_type": "code", "execution_count": 23, - "id": "", "metadata": {}, "outputs": [], "source": [ @@ -1254,7 +1213,6 @@ { "cell_type": "code", "execution_count": 24, - "id": "", "metadata": {}, "outputs": [ { @@ -1270,7 +1228,6 @@ { "cell_type": "code", "execution_count": 25, - "id": "", "metadata": {}, "outputs": [ { @@ -1292,7 +1249,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Transcribe the audio file" @@ -1301,7 +1257,6 @@ { "cell_type": "code", "execution_count": 26, - "id": "", "metadata": {}, "outputs": [ { @@ -1320,7 +1275,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -1331,7 +1285,6 @@ { "cell_type": "code", "execution_count": 27, - "id": "", "metadata": {}, "outputs": [ { @@ -1351,7 +1304,6 @@ { "cell_type": "code", "execution_count": 28, - "id": "", "metadata": {}, "outputs": [ { @@ -1372,7 +1324,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Load the image" @@ -1381,7 +1332,6 @@ { "cell_type": "code", "execution_count": 29, - "id": "", "metadata": {}, "outputs": [ { @@ -1411,7 +1361,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "### Set up the huggingface transformer" @@ -1420,7 +1369,6 @@ { "cell_type": "code", "execution_count": 30, - "id": "", "metadata": {}, "outputs": [ { @@ -1440,7 +1388,6 @@ { "cell_type": "code", "execution_count": 31, - "id": "", "metadata": {}, "outputs": [ { @@ -1471,7 +1418,6 @@ { "cell_type": "code", "execution_count": 32, - "id": "", "metadata": {}, "outputs": [ { @@ -1551,7 +1497,6 @@ { "cell_type": "code", "execution_count": 33, - "id": "", "metadata": {}, "outputs": [ { @@ -1666,7 +1611,6 @@ { "cell_type": "code", "execution_count": 34, - "id": "", "metadata": {}, "outputs": [ { @@ -1703,7 +1647,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "\n", @@ -1714,7 +1657,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "- Handle transactional and analytical queries with your vector data\n", @@ -1730,7 +1672,6 @@ { "attachments": {}, "cell_type": "markdown", - "id": "", "metadata": {}, "source": [ "## Reset Demo" @@ -1739,7 +1680,6 @@ { "cell_type": "code", "execution_count": 35, - "id": "", "metadata": {}, "outputs": [ { @@ -1759,7 +1699,7 @@ }, { "cell_type": "markdown", - "id": "", + "id": "44f1b246-7829-4564-ad79-38f4344f6b71", "metadata": {}, "source": [ "
\n", diff --git a/resources/nb-check.py b/resources/nb-check.py index 0c8a5f8..b04c25e 100755 --- a/resources/nb-check.py +++ b/resources/nb-check.py @@ -167,7 +167,8 @@ def new_markdown_cell(cell_id: str, content: list[str]) -> dict[str, Any]: source = ''.join(source) if 'id="singlestore-header"' in source: header_cell = cells.pop(0) - header_id = header_cell.get('id', header_id) + if header_cell.get('id', None): + header_id = header_cell['id'] # Remove Free Starter Workspace notification, it will be regenerated later if cells: @@ -177,7 +178,8 @@ def new_markdown_cell(cell_id: str, content: list[str]) -> dict[str, Any]: if not isinstance(source, str): source = ''.join(source) if 'alert-warning' in source and 'can be run on a Free Starter' in source: - starter_id = cells[i].get('id', starter_id) + if cells[i].get('id', None): + starter_id = cells[i]['id'] remove_cells.insert(0, i) for i in remove_cells: cells.pop(i) @@ -189,7 +191,8 @@ def new_markdown_cell(cell_id: str, content: list[str]) -> dict[str, Any]: source = ''.join(source) if 'id="singlestore-footer"' in source: footer_cell = cells.pop(-1) - footer_id = footer_cell.get('id', footer_id) + if footer_cell.get('id', None): + footer_id = footer_cell['id'] for cell in cells: @@ -207,6 +210,10 @@ def new_markdown_cell(cell_id: str, content: list[str]) -> dict[str, Any]: if 'attachments' in cell and cell['attachments'] is None: cell['attachments'] = {} + # Remove empty IDs + if 'id' in cell and not cell['id']: + del cell['id'] + # Prepare parameter substitutions for header try: icon_name = toml_info['meta']['icon']