From 68f3da12ea303c2bcb32c4224291eaa6f006c8a4 Mon Sep 17 00:00:00 2001 From: Touseef Ahmad <124333084+touseefahmed96@users.noreply.github.com> Date: Tue, 28 Jan 2025 12:55:39 +0500 Subject: [PATCH] Minor Fix in the example docs (#383) --- docs/source/en/examples/rag.md | 2 +- docs/source/en/examples/text_to_sql.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/source/en/examples/rag.md b/docs/source/en/examples/rag.md index 019b34c..d8d9cf3 100644 --- a/docs/source/en/examples/rag.md +++ b/docs/source/en/examples/rag.md @@ -35,7 +35,7 @@ Let's build this system. 🛠️ Run the line below to install required dependencies: ```bash -!pip install smolagents pandas langchain langchain-community sentence-transformers datasets rank_bm25 --upgrade -q +!pip install smolagents pandas langchain langchain-community sentence-transformers datasets python-dotenv rank_bm25 --upgrade -q ``` To call the HF Inference API, you will need a valid token as your environment variable `HF_TOKEN`. We use python-dotenv to load it. diff --git a/docs/source/en/examples/text_to_sql.md b/docs/source/en/examples/text_to_sql.md index 86c5091..16cf821 100644 --- a/docs/source/en/examples/text_to_sql.md +++ b/docs/source/en/examples/text_to_sql.md @@ -27,7 +27,18 @@ A standard text-to-sql pipeline is brittle, since the generated SQL query can be Let’s build this agent! 💪 -First, we setup the SQL environment: +Run the line below to install required dependencies: +```bash +!pip install smolagents python-dotenv sqlalchemy --upgrade -q +``` +To call the HF Inference API, you will need a valid token as your environment variable `HF_TOKEN`. +We use python-dotenv to load it. +```py +from dotenv import load_dotenv +load_dotenv() +``` + +Then, we setup the SQL environment: ```py from sqlalchemy import ( create_engine,