diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml
index 140d3b6..d8692f1 100644
--- a/.github/workflows/deploy_docs.yaml
+++ b/.github/workflows/deploy_docs.yaml
@@ -19,8 +19,8 @@ jobs:
- name: Install requirements
run: |
python -m pip install --upgrade pip
- pip install mkdocs mkdocs-techdocs-core pymdown-extensions mkdocs_monorepo_plugin
+ pip install mkdocs pymdown-extensions termynal mkdocs-material
- name: Deploying MkDocs documentation
run: |
mkdocs build
- mkdocs gh-deploy --force
+ mkdocs gh-deploy --force
\ No newline at end of file
diff --git a/docs/images/favicon.svg b/docs/images/favicon.svg
new file mode 100644
index 0000000..247c970
--- /dev/null
+++ b/docs/images/favicon.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/docs/images/logo.svg b/docs/images/logo.svg
new file mode 100644
index 0000000..146732c
--- /dev/null
+++ b/docs/images/logo.svg
@@ -0,0 +1,36 @@
+
+
\ No newline at end of file
diff --git a/docs/stylesheets/skaff.css b/docs/stylesheets/skaff.css
new file mode 100644
index 0000000..b744c67
--- /dev/null
+++ b/docs/stylesheets/skaff.css
@@ -0,0 +1,73 @@
+/* https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/#custom-colors */
+:root {
+ --md-primary-fg-color: #142146;
+ --md-accent-fg-color: #fc2c7f;
+}
+
+ /* Revert hue value to that of pre mkdocs-material v9.4.0 */
+ [data-md-color-scheme="slate"] {
+ /* Hue taken from hsl of #142146, used for bg on website*/
+ --md-hue: 227;
+ /* Increase the lightness by 5%, opacity by 0.2 */
+ --md-default-fg-color: hsla(var(--md-hue),15%,95%,1.0);
+ --md-default-fg-color--light: hsla(var(--md-hue),15%,95%,0.76);
+ --md-default-fg-color--lighter: hsla(var(--md-hue),15%,95%,0.52);
+ --md-default-fg-color--lightest: hsla(var(--md-hue),15%,95%,0.32);
+ /* Change the saturation and lightness to match #142146 */
+ --md-default-bg-color: hsla(var(--md-hue),87%,6%,1);
+ --md-default-bg-color--light: hsla(var(--md-hue),87%,6%,0.54);
+ --md-default-bg-color--lighter: hsla(var(--md-hue),87%,6%,0.26);
+ --md-default-bg-color--lightest: hsla(var(--md-hue),87%,6%,0.07);
+ /* Increase the opacity of code to 1.0 */
+ --md-code-fg-color: hsla(var(--md-hue),18%,86%,1.0);
+ --md-code-hl-comment-color: #666666;
+ --md-typeset-a-color: #65cccc;
+ }
+
+ [data-md-color-scheme="default"] {
+ --md-hue: 227;
+ --md-default-bg-color: hsla(var(--md-hue),100%,96%,1);
+ --md-typeset-a-color: #65cccc;
+
+ --md-code-fg-color: hsla(var(--md-hue),18%,86%,1.0);
+ --md-code-bg-color: #262a32;
+ --md-code-hl-name-color: var(--md-code-fg-color);
+ --md-code-hl-operator-color: var(--md-code-fg-color);
+ --md-code-hl-punctuation-color: var(--md-code-fg-color);
+ --md-code-hl-comment-color: #666666;
+ --md-code-hl-variable-color: var(--md-code-fg-color);
+ }
+
+ .custom-source-wrapper {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: 12px;
+ }
+
+ @media screen and (min-width: 60em) {
+ .md-header__source {
+ box-sizing: content-box;
+ max-width: 11.7rem;
+ width: 11.7rem;
+ }
+ }
+
+ .custom-login-button {
+ font-size: 0.8rem;
+ font-weight: 700;
+ float: right;
+ border: 2px solid #fff;
+ border-radius: 8px;
+ padding: 6px 12px;
+ transition: opacity .25s;
+ }
+
+ .custom-login-button:hover {
+ opacity: 0.7
+ }
+
+ /* Hide all ToC entries for parameters. */
+ li.md-nav__item>a[href*="("] {
+ display: none;
+ }
diff --git a/examples/load_documents.ipynb b/examples/load_documents.ipynb
deleted file mode 100644
index 524aa21..0000000
--- a/examples/load_documents.ipynb
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "This is an interactive example that will walk you through the initialization of a RAG and the basic embedding of a few documents."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "from pathlib import Path\n",
- "import sys\n",
- "import os\n",
- "repo_root = Path(os.getcwd()).parent\n",
- "sys.path.append(str(repo_root))\n",
- "\n",
- "from backend.config import RagConfig\n",
- "from backend.rag_components.rag import RAG\n",
- "\n",
- "rag_config = RagConfig.from_yaml(repo_root / \"backend\" / \"config.yaml\")\n",
- "rag_config.database.database_url = f\"sqlite:////{repo_root}/database/rag.sqlite3\"\n",
- "\n",
- "rag = RAG(config=rag_config)\n",
- "\n",
- "print(\"LLM:\", rag.llm.__class__.__name__)\n",
- "print(\"Embedding model:\", rag.embeddings.__class__.__name__)\n",
- "print(\"Vector store:\", rag.vector_store.__class__.__name__)\n",
- "print(\"Retriever:\", rag.retriever.__class__.__name__)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Here we transform our CSV into standalone embeddable documents that we will be able to feed the vector store.\n",
- "\n",
- "We generate one document for each line, and each document will contain header:value pairs for all the columns.\n",
- "\n",
- "This is a very simplistic example, but vector store data models can get more advanced to support more [powerful retreival methods.](https://python.langchain.com/docs/modules/data_connection/retrievers/)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "from langchain_community.document_loaders.csv_loader import CSVLoader\n",
- "from langchain.vectorstores.utils import filter_complex_metadata\n",
- "\n",
- "\n",
- "data_sample_path = repo_root / \"examples\" / \"billionaires.csv\"\n",
- "\n",
- "loader = CSVLoader(\n",
- " file_path=str(data_sample_path),\n",
- " csv_args={\"delimiter\": \",\", \"quotechar\": '\"', \"escapechar\": \"\\\\\"},\n",
- " encoding=\"utf-8-sig\",\n",
- ")\n",
- "\n",
- "raw_documents = loader.load()\n",
- "documents = filter_complex_metadata(raw_documents)\n",
- "documents[:5]"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "To load the docs in the vector store, we recommend using the `load_document` as it [indexes previously embedded docs](https://python.langchain.com/docs/modules/data_connection/indexing), making the process idempotent."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "rag.load_documents(documents)"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "venv",
- "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.11.5"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
diff --git a/load_documents.ipynb b/load_documents.ipynb
new file mode 100644
index 0000000..0d521a1
--- /dev/null
+++ b/load_documents.ipynb
@@ -0,0 +1,204 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "This is an interactive example that will walk you through the initialization of a RAG and the basic embedding of a few documents."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Successfuly ran script at /Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/backend/rag_components/rag_tables.sql for sqlite\n",
+ "/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/venv/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:117: LangChainDeprecationWarning: The class `langchain_community.chat_models.azure_openai.AzureChatOpenAI` was deprecated in langchain-community 0.0.10 and will be removed in 0.2.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run `pip install -U langchain-openai` and import as `from langchain_openai import AzureChatOpenAI`.\n",
+ " warn_deprecated(\n",
+ "/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/venv/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
+ " from .autonotebook import tqdm as notebook_tqdm\n"
+ ]
+ },
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "LLM: AzureChatOpenAI\n",
+ "Embedding model: HuggingFaceEmbeddings\n",
+ "Vector store: Chroma\n",
+ "Retriever: VectorStoreRetriever\n"
+ ]
+ }
+ ],
+ "source": [
+ "from pathlib import Path\n",
+ "import os\n",
+ "\n",
+ "from backend.config import RagConfig\n",
+ "from backend.rag_components.rag import RAG\n",
+ "\n",
+ "repo_root = Path(os.getcwd())\n",
+ "\n",
+ "rag_config = RagConfig.from_yaml(repo_root / \"backend\" / \"config.yaml\")\n",
+ "rag = RAG(config=rag_config)\n",
+ "\n",
+ "print(\"LLM:\", rag.llm.__class__.__name__)\n",
+ "print(\"Embedding model:\", rag.embeddings.__class__.__name__)\n",
+ "print(\"Vector store:\", rag.vector_store.__class__.__name__)\n",
+ "print(\"Retriever:\", rag.retriever.__class__.__name__)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Here we transform our CSV into standalone embeddable documents that we will be able to feed the vector store.\n",
+ "\n",
+ "We generate one document for each line, and each document will contain header:value pairs for all the columns.\n",
+ "\n",
+ "This is a very simplistic example, but vector store data models can get more advanced to support more [powerful retreival methods.](https://python.langchain.com/docs/modules/data_connection/retrievers/)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "[Document(page_content='rank: 1\\nfinalWorth: 211000\\ncategory: Fashion & Retail\\npersonName: Bernard Arnault & family\\nage: 74\\ncountry: France\\ncity: Paris\\nsource: LVMH\\nindustries: Fashion & Retail\\ncountryOfCitizenship: France\\norganization: LVMH Moët Hennessy Louis Vuitton\\nselfMade: FALSE\\nstatus: U\\ngender: M\\nbirthDate: 3/5/1949 0:00\\nlastName: Arnault\\nfirstName: Bernard\\ntitle: Chairman and CEO\\ndate: 4/4/2023 5:01\\nstate: \\nresidenceStateRegion: \\nbirthYear: 1949\\nbirthMonth: 3\\nbirthDay: 5\\ncpi_country: 110.05\\ncpi_change_country: 1.1\\ngdp_country: $2,715,518,274,227\\ngross_tertiary_education_enrollment: 65.6\\ngross_primary_education_enrollment_country: 102.5\\nlife_expectancy_country: 82.5\\ntax_revenue_country_country: 24.2\\ntotal_tax_rate_country: 60.7\\npopulation_country: 67059887\\nlatitude_country: 46.227638\\nlongitude_country: 2.213749', metadata={'source': '/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/examples/billionaires.csv', 'row': 0}),\n",
+ " Document(page_content='rank: 2\\nfinalWorth: 180000\\ncategory: Automotive\\npersonName: Elon Musk\\nage: 51\\ncountry: United States\\ncity: Austin\\nsource: Tesla, SpaceX\\nindustries: Automotive\\ncountryOfCitizenship: United States\\norganization: Tesla\\nselfMade: TRUE\\nstatus: D\\ngender: M\\nbirthDate: 6/28/1971 0:00\\nlastName: Musk\\nfirstName: Elon\\ntitle: CEO\\ndate: 4/4/2023 5:01\\nstate: Texas\\nresidenceStateRegion: South\\nbirthYear: 1971\\nbirthMonth: 6\\nbirthDay: 28\\ncpi_country: 117.24\\ncpi_change_country: 7.5\\ngdp_country: $21,427,700,000,000\\ngross_tertiary_education_enrollment: 88.2\\ngross_primary_education_enrollment_country: 101.8\\nlife_expectancy_country: 78.5\\ntax_revenue_country_country: 9.6\\ntotal_tax_rate_country: 36.6\\npopulation_country: 328239523\\nlatitude_country: 37.09024\\nlongitude_country: -95.712891', metadata={'source': '/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/examples/billionaires.csv', 'row': 1}),\n",
+ " Document(page_content='rank: 3\\nfinalWorth: 114000\\ncategory: Technology\\npersonName: Jeff Bezos\\nage: 59\\ncountry: United States\\ncity: Medina\\nsource: Amazon\\nindustries: Technology\\ncountryOfCitizenship: United States\\norganization: Amazon\\nselfMade: TRUE\\nstatus: D\\ngender: M\\nbirthDate: 1/12/1964 0:00\\nlastName: Bezos\\nfirstName: Jeff\\ntitle: Chairman and Founder\\ndate: 4/4/2023 5:01\\nstate: Washington\\nresidenceStateRegion: West\\nbirthYear: 1964\\nbirthMonth: 1\\nbirthDay: 12\\ncpi_country: 117.24\\ncpi_change_country: 7.5\\ngdp_country: $21,427,700,000,000\\ngross_tertiary_education_enrollment: 88.2\\ngross_primary_education_enrollment_country: 101.8\\nlife_expectancy_country: 78.5\\ntax_revenue_country_country: 9.6\\ntotal_tax_rate_country: 36.6\\npopulation_country: 328239523\\nlatitude_country: 37.09024\\nlongitude_country: -95.712891', metadata={'source': '/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/examples/billionaires.csv', 'row': 2}),\n",
+ " Document(page_content='rank: 4\\nfinalWorth: 107000\\ncategory: Technology\\npersonName: Larry Ellison\\nage: 78\\ncountry: United States\\ncity: Lanai\\nsource: Oracle\\nindustries: Technology\\ncountryOfCitizenship: United States\\norganization: Oracle\\nselfMade: TRUE\\nstatus: U\\ngender: M\\nbirthDate: 8/17/1944 0:00\\nlastName: Ellison\\nfirstName: Larry\\ntitle: CTO and Founder\\ndate: 4/4/2023 5:01\\nstate: Hawaii\\nresidenceStateRegion: West\\nbirthYear: 1944\\nbirthMonth: 8\\nbirthDay: 17\\ncpi_country: 117.24\\ncpi_change_country: 7.5\\ngdp_country: $21,427,700,000,000\\ngross_tertiary_education_enrollment: 88.2\\ngross_primary_education_enrollment_country: 101.8\\nlife_expectancy_country: 78.5\\ntax_revenue_country_country: 9.6\\ntotal_tax_rate_country: 36.6\\npopulation_country: 328239523\\nlatitude_country: 37.09024\\nlongitude_country: -95.712891', metadata={'source': '/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/examples/billionaires.csv', 'row': 3}),\n",
+ " Document(page_content='rank: 5\\nfinalWorth: 106000\\ncategory: Finance & Investments\\npersonName: Warren Buffett\\nage: 92\\ncountry: United States\\ncity: Omaha\\nsource: Berkshire Hathaway\\nindustries: Finance & Investments\\ncountryOfCitizenship: United States\\norganization: Berkshire Hathaway Inc. (Cl A)\\nselfMade: TRUE\\nstatus: D\\ngender: M\\nbirthDate: 8/30/1930 0:00\\nlastName: Buffett\\nfirstName: Warren\\ntitle: CEO\\ndate: 4/4/2023 5:01\\nstate: Nebraska\\nresidenceStateRegion: Midwest\\nbirthYear: 1930\\nbirthMonth: 8\\nbirthDay: 30\\ncpi_country: 117.24\\ncpi_change_country: 7.5\\ngdp_country: $21,427,700,000,000\\ngross_tertiary_education_enrollment: 88.2\\ngross_primary_education_enrollment_country: 101.8\\nlife_expectancy_country: 78.5\\ntax_revenue_country_country: 9.6\\ntotal_tax_rate_country: 36.6\\npopulation_country: 328239523\\nlatitude_country: 37.09024\\nlongitude_country: -95.712891', metadata={'source': '/Users/alexis.vialaret/vscode_projects/skaff-rag-accelerator/examples/billionaires.csv', 'row': 4})]"
+ ]
+ },
+ "execution_count": 2,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "from langchain_community.document_loaders.csv_loader import CSVLoader\n",
+ "from langchain.vectorstores.utils import filter_complex_metadata\n",
+ "\n",
+ "\n",
+ "data_sample_path = repo_root / \"examples\" / \"billionaires.csv\"\n",
+ "\n",
+ "loader = CSVLoader(\n",
+ " file_path=str(data_sample_path),\n",
+ " csv_args={\"delimiter\": \",\", \"quotechar\": '\"', \"escapechar\": \"\\\\\"},\n",
+ " encoding=\"utf-8-sig\",\n",
+ ")\n",
+ "\n",
+ "raw_documents = loader.load()\n",
+ "documents = filter_complex_metadata(raw_documents)\n",
+ "documents[:5]"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "To load the docs in the vector store, we recommend using the `load_document` as it [indexes previously embedded docs](https://python.langchain.com/docs/modules/data_connection/indexing), making the process idempotent."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Indexing 2640 documents.\n",
+ "Indexing batch 0 to 100.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 100 to 200.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 200 to 300.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 300 to 400.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 400 to 500.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 500 to 600.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 600 to 700.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 700 to 800.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 800 to 900.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 900 to 1000.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1000 to 1100.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1100 to 1200.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1200 to 1300.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1300 to 1400.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1400 to 1500.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1500 to 1600.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1600 to 1700.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1700 to 1800.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1800 to 1900.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 1900 to 2000.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2000 to 2100.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2100 to 2200.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2200 to 2300.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2300 to 2400.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2400 to 2500.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2500 to 2600.\n",
+ "{'event': 'load_documents', 'num_added': 100, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n",
+ "Indexing batch 2600 to 2640.\n",
+ "{'event': 'load_documents', 'num_added': 40, 'num_updated': 0, 'num_skipped': 0, 'num_deleted': 0}\n"
+ ]
+ }
+ ],
+ "source": [
+ "rag.load_documents(documents)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "venv",
+ "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.11.5"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/mkdocs.yml b/mkdocs.yml
index a7f4f7d..ea5e3f5 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -2,24 +2,87 @@ site_name: GenAI RAG Accelerator
repo_name: artefactory/skaff-rag-accelerator
repo_url: https://github.com/artefactory/skaff-rag-accelerator
+theme:
+ name: material
+ logo: images/logo.svg
+ favicon: images/favicon.svg
+ font:
+ text: Oxygen
+ features:
+ - search.suggest
+ - search.highlight
+ - content.code.annotate
+ - content.code.copy
+ - content.code.select
+ - navigation.indexes
+ - navigation.path
+ - navigation.instant
+ - navigation.instant.preview
+ - navigation.instant.prefetch
+ - navigation.instant.progress
+ - navigation.tracking
+ - toc.follow
+ palette: # Light and dark mode
+ - media: "(prefers-color-scheme: light)"
+ scheme: default
+ primary: custom
+ accent: custom
+ toggle:
+ icon: material/lightbulb-outline
+ name: "Switch to dark mode"
+ - media: "(prefers-color-scheme: dark)"
+ scheme: slate
+ primary: custom
+ accent: custom
+ toggle:
+ icon: material/lightbulb
+ name: "Switch to light mode"
+
+extra:
+ # hide the "Made with Material for MkDocs" message
+ generator: false
+ analytics:
+ provider: google
+ property: G-7REH78BCSD
+ feedback:
+ title: Was this page helpful?
+ ratings:
+ - icon: material/thumb-up-outline
+ name: This page was helpful
+ data: 1@
+ note: >-
+ Thanks for your feedback!
+ - icon: material/thumb-down-outline
+ name: This page could be improved
+ data: 0
+ note: >-
+ Thanks for your feedback! Help us improve this page by
+ opening an issue.
+
+extra_css:
+ - stylesheets/skaff.css
+
plugins:
- - techdocs-core
+ - termynal
+ - search
markdown_extensions:
- admonition
- attr_list
- md_in_html
- pymdownx.superfences
- - pymdownx.tabbed
+ - pymdownx.tabbed:
+ alternate_style: true
- pymdownx.tasklist
- pymdownx.snippets
+
nav:
- Home: index.md
- The frontend: frontend.md
- The database: database.md
- The backend:
- - The backend: backend/backend.md
+ - The Backend: backend/backend.md
- RAG and RAGConfig classes: backend/rag_ragconfig.md
- Chains and chain links: backend/chains/chains.md
- API Plugins:
diff --git a/requirements-dev.txt b/requirements-dev.txt
index e3a19fe..7b52498 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -4,4 +4,6 @@ mkdocs
mkdocs_monorepo_plugin
pymdown-extensions
mkdocs-pymdownx-material-extras
-mkdocs-techdocs-core
\ No newline at end of file
+mkdocs-techdocs-core
+termynal
+mkdocs-material
\ No newline at end of file