langchain-serpex-python 0.1.4__tar.gz → 0.1.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. langchain_serpex_python-0.1.6/.gitignore +5 -0
  2. langchain_serpex_python-0.1.6/CHANGELOG.md +8 -0
  3. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/PKG-INFO +27 -55
  4. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/README.md +21 -50
  5. langchain_serpex_python-0.1.6/langchain_serpex_python/__init__.py +9 -0
  6. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/langchain_serpex_python/tools.py +12 -15
  7. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/pyproject.toml +5 -4
  8. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/tests/integration_tests/test_tools.py +5 -7
  9. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/tests/unit_tests/test_tools.py +8 -8
  10. langchain_serpex_python-0.1.4/langchain_serpex_python/__init__.py +0 -10
  11. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/.github/workflows/publish-pypi.yml +0 -0
  12. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/LICENSE +0 -0
  13. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/Makefile +0 -0
  14. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/langchain_serpex_python/py.typed +0 -0
  15. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/tests/__init__.py +0 -0
  16. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/tests/integration_tests/__init__.py +0 -0
  17. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/tests/unit_tests/__init__.py +0 -0
  18. {langchain_serpex_python-0.1.4 → langchain_serpex_python-0.1.6}/uv.lock +0 -0
@@ -0,0 +1,5 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .pytest_cache/
4
+ dist/
5
+ *.egg-info/
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## 0.1.6 — 2026-09-22
4
+
5
+ - docs: positioning — Serpex is a real-time web search API; README, docstrings and the tool description updated. Docstring examples now use the real package/module names (`langchain-serpex-python` / `langchain_serpex_python`).
6
+ - `engine` deprecated (ignored by the API since 2026-06). The `engine` field is still accepted with the same default; request behaviour is unchanged. Class, tool name and exports unchanged.
7
+ - Tests: engine names removed; integration tests import the real module. Removed committed `__pycache__` files.
8
+ - package description, keywords and repository URLs updated.
@@ -1,13 +1,14 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: langchain-serpex-python
3
- Version: 0.1.4
4
- Summary: An integration package connecting SERPEX and LangChain (Python)
3
+ Version: 0.1.6
4
+ Summary: LangChain integration for Serpex, a real-time web search API (Python)
5
5
  Project-URL: Homepage, https://docs.langchain.com/oss/python/integrations/providers/serpex
6
6
  Project-URL: Documentation, https://serpex.dev/docs
7
- Project-URL: Source, https://github.com/divyeshradadiya/langchain-serpex
8
- Project-URL: Repository, https://github.com/divyeshradadiya/langchain-serpex
7
+ Project-URL: Source, https://github.com/divyeshradadiya/langchain-serpex-python
8
+ Project-URL: Repository, https://github.com/divyeshradadiya/langchain-serpex-python
9
9
  License: MIT
10
10
  License-File: LICENSE
11
+ Keywords: ai-agents,langchain,llm,rag,real-time-search,search,search-api,serpex,web-search
11
12
  Requires-Python: <4.0.0,>=3.9.0
12
13
  Requires-Dist: httpx>=0.27.0
13
14
  Requires-Dist: langchain-core<1.0.0,>=0.3.0
@@ -19,7 +20,7 @@ Description-Content-Type: text/markdown
19
20
  [![PyPI - License](https://img.shields.io/pypi/l/langchain-serpex-python)](https://opensource.org/licenses/MIT)
20
21
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)
21
22
 
22
- This package contains the LangChain integration with SERPEX (Python).
23
+ This package contains the LangChain integration with Serpex (Python).
23
24
 
24
25
  ## Installation
25
26
 
@@ -27,17 +28,19 @@ This package contains the LangChain integration with SERPEX (Python).
27
28
  pip install langchain-serpex-python
28
29
  ```
29
30
 
30
- ## What is SERPEX?
31
+ ## What is Serpex?
31
32
 
32
- SERPEX is a powerful multi-engine search API that provides access to search results from Google, Bing, DuckDuckGo, Baidu, Yandex, and other search engines in JSON format. It's designed for developers building AI applications, SEO tools, market research platforms, and data aggregation services.
33
+ Serpex is a real-time web search API. It returns structured JSON results
34
+ (title, URL, snippet) for any query, and offers page content extraction that
35
+ turns URLs into LLM-ready markdown. It's built for AI agents, LLM tools and
36
+ RAG pipelines.
33
37
 
34
38
  ## Features
35
39
 
36
- - **Multi-Engine Support**: Search across Google, Bing, DuckDuckGo, Baidu, and Yandex
37
- - **Rich Results**: Get organic results, answer boxes, knowledge graphs, news, images, videos, and shopping results
38
- - **Localization**: Support for location-based and language-specific searches
39
- - **Real-time Data**: Access to current search results
40
- - **Easy Integration**: Simple API with comprehensive documentation
40
+ - **Real-time web search**: current results for any query
41
+ - **One search engine**: nothing to configure no engine to pick
42
+ - **LangChain-native**: a drop-in `BaseTool` for agents and chains
43
+ - **Easy integration**: API key via argument or `SERPEX_API_KEY`
41
44
 
42
45
  ## Quick Start
43
46
 
@@ -51,11 +54,7 @@ Sign up at [SERPEX](https://serpex.dev) to get your API key.
51
54
  from langchain_serpex_python import SerpexSearchResults
52
55
 
53
56
  # Initialize the tool
54
- tool = SerpexSearchResults(
55
- api_key="your-serpex-api-key",
56
- engine="google",
57
- num_results=10
58
- )
57
+ tool = SerpexSearchResults(api_key="your-serpex-api-key")
59
58
 
60
59
  # Perform a search
61
60
  results = tool.invoke("latest AI developments")
@@ -70,11 +69,7 @@ from langchain_openai import ChatOpenAI
70
69
  from langchain.agents import initialize_agent, AgentType
71
70
 
72
71
  # Initialize the search tool
73
- search_tool = SerpexSearchResults(
74
- api_key="your-serpex-api-key",
75
- engine="google",
76
- num_results=5
77
- )
72
+ search_tool = SerpexSearchResults(api_key="your-serpex-api-key")
78
73
 
79
74
  # Initialize the LLM
80
75
  llm = ChatOpenAI(temperature=0)
@@ -100,37 +95,18 @@ from langchain_serpex_python import SerpexSearchResults
100
95
  # Configure with advanced parameters
101
96
  tool = SerpexSearchResults(
102
97
  api_key="your-serpex-api-key",
103
- engine="google",
104
- num_results=20,
105
- gl="us", # Country code
106
- hl="en", # Language code
107
- location="New York", # Specific location
108
- time_period="m", # Results from past month
109
- safe_search="moderate"
98
+ time_range="month"
110
99
  )
111
100
 
112
- # Search for location-specific results
113
101
  results = tool.invoke("best restaurants")
114
102
  print(results)
115
103
  ```
116
104
 
117
- ### Different Search Engines
105
+ ### The `engine` parameter (deprecated)
118
106
 
119
- ```python
120
- from langchain_serpex_python import SerpexSearchResults
121
-
122
- # Google Search
123
- google_tool = SerpexSearchResults(api_key="your-key", engine="google")
124
- google_results = google_tool.invoke("Python programming")
125
-
126
- # Bing Search
127
- bing_tool = SerpexSearchResults(api_key="your-key", engine="bing")
128
- bing_results = bing_tool.invoke("Python programming")
129
-
130
- # DuckDuckGo Search
131
- ddg_tool = SerpexSearchResults(api_key="your-key", engine="duckduckgo")
132
- ddg_results = ddg_tool.invoke("Python programming")
133
- ```
107
+ Serpex is one search engine, so there is nothing to select. `engine` is
108
+ deprecated and ignored by the Serpex API since 2026-06; it is still accepted
109
+ so existing code keeps working.
134
110
 
135
111
  ## Configuration
136
112
 
@@ -152,14 +128,10 @@ tool = SerpexSearchResults() # Will use SERPEX_API_KEY from environment
152
128
 
153
129
  ### Parameters
154
130
 
155
- - `api_key` (str): Your SERPEX API key (required)
156
- - `engine` (str): Search engine to use - "google", "bing", "duckduckgo", "baidu", "yandex" (default: "google")
157
- - `num_results` (int): Number of results to return, 1-100 (default: 10)
158
- - `gl` (str): Country code for localized results (e.g., "us", "uk", "ca")
159
- - `hl` (str): Language code (e.g., "en", "es", "fr")
160
- - `location` (str): Specific location for localized results
161
- - `time_period` (str): Time filter - "d" (day), "w" (week), "m" (month), "y" (year)
162
- - `safe_search` (str): Safe search filter - "off", "moderate", "strict"
131
+ - `api_key` (str): Your Serpex API key (required)
132
+ - `engine` (str): **Deprecated** ignored by the Serpex API (default: "auto"); still accepted
133
+ - `category` (str): Search category - currently only "web" is supported (default: "web")
134
+ - `time_range` (str): Time filter - "all", "day", "week", "month", "year"
163
135
 
164
136
  ## Documentation
165
137
 
@@ -4,7 +4,7 @@
4
4
  [![PyPI - License](https://img.shields.io/pypi/l/langchain-serpex-python)](https://opensource.org/licenses/MIT)
5
5
  [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)
6
6
 
7
- This package contains the LangChain integration with SERPEX (Python).
7
+ This package contains the LangChain integration with Serpex (Python).
8
8
 
9
9
  ## Installation
10
10
 
@@ -12,17 +12,19 @@ This package contains the LangChain integration with SERPEX (Python).
12
12
  pip install langchain-serpex-python
13
13
  ```
14
14
 
15
- ## What is SERPEX?
15
+ ## What is Serpex?
16
16
 
17
- SERPEX is a powerful multi-engine search API that provides access to search results from Google, Bing, DuckDuckGo, Baidu, Yandex, and other search engines in JSON format. It's designed for developers building AI applications, SEO tools, market research platforms, and data aggregation services.
17
+ Serpex is a real-time web search API. It returns structured JSON results
18
+ (title, URL, snippet) for any query, and offers page content extraction that
19
+ turns URLs into LLM-ready markdown. It's built for AI agents, LLM tools and
20
+ RAG pipelines.
18
21
 
19
22
  ## Features
20
23
 
21
- - **Multi-Engine Support**: Search across Google, Bing, DuckDuckGo, Baidu, and Yandex
22
- - **Rich Results**: Get organic results, answer boxes, knowledge graphs, news, images, videos, and shopping results
23
- - **Localization**: Support for location-based and language-specific searches
24
- - **Real-time Data**: Access to current search results
25
- - **Easy Integration**: Simple API with comprehensive documentation
24
+ - **Real-time web search**: current results for any query
25
+ - **One search engine**: nothing to configure no engine to pick
26
+ - **LangChain-native**: a drop-in `BaseTool` for agents and chains
27
+ - **Easy integration**: API key via argument or `SERPEX_API_KEY`
26
28
 
27
29
  ## Quick Start
28
30
 
@@ -36,11 +38,7 @@ Sign up at [SERPEX](https://serpex.dev) to get your API key.
36
38
  from langchain_serpex_python import SerpexSearchResults
37
39
 
38
40
  # Initialize the tool
39
- tool = SerpexSearchResults(
40
- api_key="your-serpex-api-key",
41
- engine="google",
42
- num_results=10
43
- )
41
+ tool = SerpexSearchResults(api_key="your-serpex-api-key")
44
42
 
45
43
  # Perform a search
46
44
  results = tool.invoke("latest AI developments")
@@ -55,11 +53,7 @@ from langchain_openai import ChatOpenAI
55
53
  from langchain.agents import initialize_agent, AgentType
56
54
 
57
55
  # Initialize the search tool
58
- search_tool = SerpexSearchResults(
59
- api_key="your-serpex-api-key",
60
- engine="google",
61
- num_results=5
62
- )
56
+ search_tool = SerpexSearchResults(api_key="your-serpex-api-key")
63
57
 
64
58
  # Initialize the LLM
65
59
  llm = ChatOpenAI(temperature=0)
@@ -85,37 +79,18 @@ from langchain_serpex_python import SerpexSearchResults
85
79
  # Configure with advanced parameters
86
80
  tool = SerpexSearchResults(
87
81
  api_key="your-serpex-api-key",
88
- engine="google",
89
- num_results=20,
90
- gl="us", # Country code
91
- hl="en", # Language code
92
- location="New York", # Specific location
93
- time_period="m", # Results from past month
94
- safe_search="moderate"
82
+ time_range="month"
95
83
  )
96
84
 
97
- # Search for location-specific results
98
85
  results = tool.invoke("best restaurants")
99
86
  print(results)
100
87
  ```
101
88
 
102
- ### Different Search Engines
89
+ ### The `engine` parameter (deprecated)
103
90
 
104
- ```python
105
- from langchain_serpex_python import SerpexSearchResults
106
-
107
- # Google Search
108
- google_tool = SerpexSearchResults(api_key="your-key", engine="google")
109
- google_results = google_tool.invoke("Python programming")
110
-
111
- # Bing Search
112
- bing_tool = SerpexSearchResults(api_key="your-key", engine="bing")
113
- bing_results = bing_tool.invoke("Python programming")
114
-
115
- # DuckDuckGo Search
116
- ddg_tool = SerpexSearchResults(api_key="your-key", engine="duckduckgo")
117
- ddg_results = ddg_tool.invoke("Python programming")
118
- ```
91
+ Serpex is one search engine, so there is nothing to select. `engine` is
92
+ deprecated and ignored by the Serpex API since 2026-06; it is still accepted
93
+ so existing code keeps working.
119
94
 
120
95
  ## Configuration
121
96
 
@@ -137,14 +112,10 @@ tool = SerpexSearchResults() # Will use SERPEX_API_KEY from environment
137
112
 
138
113
  ### Parameters
139
114
 
140
- - `api_key` (str): Your SERPEX API key (required)
141
- - `engine` (str): Search engine to use - "google", "bing", "duckduckgo", "baidu", "yandex" (default: "google")
142
- - `num_results` (int): Number of results to return, 1-100 (default: 10)
143
- - `gl` (str): Country code for localized results (e.g., "us", "uk", "ca")
144
- - `hl` (str): Language code (e.g., "en", "es", "fr")
145
- - `location` (str): Specific location for localized results
146
- - `time_period` (str): Time filter - "d" (day), "w" (week), "m" (month), "y" (year)
147
- - `safe_search` (str): Safe search filter - "off", "moderate", "strict"
115
+ - `api_key` (str): Your Serpex API key (required)
116
+ - `engine` (str): **Deprecated** ignored by the Serpex API (default: "auto"); still accepted
117
+ - `category` (str): Search category - currently only "web" is supported (default: "web")
118
+ - `time_range` (str): Time filter - "all", "day", "week", "month", "year"
148
119
 
149
120
  ## Documentation
150
121
 
@@ -0,0 +1,9 @@
1
+ """Serpex integration for LangChain.
2
+
3
+ This module provides a LangChain tool for real-time web search with Serpex,
4
+ a real-time web search API.
5
+ """
6
+
7
+ from langchain_serpex_python.tools import SerpexSearchResults
8
+
9
+ __all__ = ["SerpexSearchResults"]
@@ -10,27 +10,26 @@ from pydantic import Field, SecretStr, model_validator
10
10
 
11
11
 
12
12
  class SerpexSearchResults(BaseTool):
13
- """Tool for searching the web using the SERPEX API.
13
+ """Tool for real-time web search with Serpex.
14
14
 
15
- SERPEX provides multi-engine search results from Google, Bing, DuckDuckGo,
16
- Brave, Yahoo, and Yandex search engines in JSON format.
15
+ Serpex is a real-time web search API that returns results as JSON.
17
16
 
18
17
  Setup:
19
- Install `langchain-serpex` and set environment variable `SERPEX_API_KEY`.
18
+ Install `langchain-serpex-python` and set environment variable
19
+ `SERPEX_API_KEY`.
20
20
 
21
21
  ```bash
22
- pip install -U langchain-serpex
22
+ pip install -U langchain-serpex-python
23
23
  export SERPEX_API_KEY="your-serpex-api-key"
24
24
  ```
25
25
 
26
26
  Instantiation:
27
27
  ```python
28
- from langchain_serpex import SerpexSearchResults
28
+ from langchain_serpex_python import SerpexSearchResults
29
29
 
30
30
  # With explicit API key
31
31
  tool = SerpexSearchResults(
32
32
  api_key="your-serpex-api-key",
33
- engine="auto", # or google, bing, duckduckgo, brave, yahoo, yandex
34
33
  time_range="day" # optional: all, day, week, month, year
35
34
  )
36
35
 
@@ -47,14 +46,13 @@ class SerpexSearchResults(BaseTool):
47
46
  # With specific parameters
48
47
  results = tool.invoke({
49
48
  "query": "Python programming",
50
- "engine": "google",
51
49
  "time_range": "week"
52
50
  })
53
51
  ```
54
52
 
55
53
  Example with Agent:
56
54
  ```python
57
- from langchain_serpex import SerpexSearchResults
55
+ from langchain_serpex_python import SerpexSearchResults
58
56
  from langchain_openai import ChatOpenAI
59
57
  from langchain.agents import initialize_agent, AgentType
60
58
 
@@ -73,19 +71,18 @@ class SerpexSearchResults(BaseTool):
73
71
 
74
72
  name: str = "serpex_search"
75
73
  description: str = (
76
- "A powerful multi-engine web search tool. "
74
+ "A real-time web search tool. "
77
75
  "Useful for answering questions about current events, "
78
76
  "finding information from the web, and getting real-time data. "
79
- "Input should be a search query string. "
80
- "Supports automatic routing with retry logic and multiple search engines "
81
- "(Google, Bing, DuckDuckGo, Brave, Yahoo, Yandex)."
77
+ "Input should be a search query string."
82
78
  )
83
79
 
84
80
  api_key: SecretStr = Field(default_factory=lambda: SecretStr(""))
85
81
  engine: str = Field(
86
82
  default="auto",
87
83
  description=(
88
- "Search engine: auto, google, bing, duckduckgo, brave, yahoo, yandex"
84
+ "Deprecated: ignored by the Serpex API since 2026-06 (Serpex is a "
85
+ "single search engine). Still accepted for backward compatibility."
89
86
  ),
90
87
  )
91
88
  category: str = Field(
@@ -95,7 +92,7 @@ class SerpexSearchResults(BaseTool):
95
92
  time_range: Optional[str] = Field(
96
93
  default=None,
97
94
  description=(
98
- "Time range: all, day, week, month, year (not supported by Brave)"
95
+ "Time range: all, day, week, month, year"
99
96
  ),
100
97
  )
101
98
 
@@ -4,8 +4,9 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "langchain-serpex-python"
7
- version = "0.1.4"
8
- description = "An integration package connecting SERPEX and LangChain (Python)"
7
+ version = "0.1.6"
8
+ description = "LangChain integration for Serpex, a real-time web search API (Python)"
9
+ keywords = ["langchain", "serpex", "search", "search-api", "web-search", "real-time-search", "ai-agents", "llm", "rag"]
9
10
  readme = "README.md"
10
11
  license = {text = "MIT"}
11
12
  authors = []
@@ -18,8 +19,8 @@ dependencies = [
18
19
  [project.urls]
19
20
  Homepage = "https://docs.langchain.com/oss/python/integrations/providers/serpex"
20
21
  Documentation = "https://serpex.dev/docs"
21
- Source = "https://github.com/divyeshradadiya/langchain-serpex"
22
- Repository = "https://github.com/divyeshradadiya/langchain-serpex"
22
+ Source = "https://github.com/divyeshradadiya/langchain-serpex-python"
23
+ Repository = "https://github.com/divyeshradadiya/langchain-serpex-python"
23
24
 
24
25
  [dependency-groups]
25
26
  test = [
@@ -5,13 +5,13 @@ import os
5
5
  import pytest
6
6
  from pydantic import SecretStr
7
7
 
8
- from langchain_serpex import SerpexSearchResults
8
+ from langchain_serpex_python import SerpexSearchResults
9
9
 
10
10
 
11
11
  @pytest.mark.compile
12
12
  def test_import() -> None:
13
13
  """Test that the module can be imported."""
14
- from langchain_serpex import SerpexSearchResults # noqa: F401
14
+ from langchain_serpex_python import SerpexSearchResults # noqa: F401
15
15
 
16
16
 
17
17
  @pytest.mark.skipif("SERPEX_API_KEY" not in os.environ, reason="SERPEX_API_KEY not set")
@@ -30,15 +30,13 @@ def test_serpex_search_integration() -> None:
30
30
 
31
31
 
32
32
  @pytest.mark.skipif("SERPEX_API_KEY" not in os.environ, reason="SERPEX_API_KEY not set")
33
- def test_serpex_different_engines() -> None:
34
- """Test search with different engines."""
33
+ def test_serpex_deprecated_engine_still_accepted() -> None:
34
+ """The deprecated `engine` value is still accepted (and ignored by the API)."""
35
35
  api_key = os.getenv("SERPEX_API_KEY")
36
36
  if not api_key:
37
37
  pytest.skip("SERPEX_API_KEY not set")
38
38
 
39
- engines = ["google", "bing", "duckduckgo"]
40
-
41
- for engine in engines:
39
+ for engine in ["auto", "legacy-value"]:
42
40
  tool = SerpexSearchResults(api_key=SecretStr(api_key), engine=engine)
43
41
  result = tool._run("test query")
44
42
  assert result
@@ -6,7 +6,7 @@ from typing import Any
6
6
  import pytest
7
7
  from pydantic import SecretStr
8
8
 
9
- from langchain_serpex import SerpexSearchResults
9
+ from langchain_serpex_python import SerpexSearchResults
10
10
 
11
11
 
12
12
  def test_serpex_initialization() -> None:
@@ -28,33 +28,33 @@ def test_serpex_custom_parameters() -> None:
28
28
  """Test that Serpex accepts custom parameters."""
29
29
  tool = SerpexSearchResults(
30
30
  api_key=SecretStr("test_api_key"),
31
- engine="google",
31
+ engine="legacy-value",
32
32
  category="web",
33
33
  time_range="day",
34
34
  )
35
- assert tool.engine == "google"
35
+ assert tool.engine == "legacy-value"
36
36
  assert tool.time_range == "day"
37
37
 
38
38
 
39
39
  def test_serpex_build_params() -> None:
40
40
  """Test that _build_params creates correct parameters."""
41
41
  tool = SerpexSearchResults(
42
- api_key=SecretStr("test_key"), engine="bing", time_range="week"
42
+ api_key=SecretStr("test_key"), engine="legacy-a", time_range="week"
43
43
  )
44
44
  params = tool._build_params("test query")
45
45
 
46
46
  assert params["q"] == "test query"
47
- assert params["engine"] == "bing"
47
+ assert params["engine"] == "legacy-a"
48
48
  assert params["category"] == "web"
49
49
  assert params["time_range"] == "week"
50
50
 
51
51
 
52
52
  def test_serpex_build_params_override() -> None:
53
53
  """Test that _build_params allows overrides."""
54
- tool = SerpexSearchResults(api_key=SecretStr("test_key"), engine="google")
55
- params = tool._build_params("test query", engine="duckduckgo", time_range="month")
54
+ tool = SerpexSearchResults(api_key=SecretStr("test_key"), engine="legacy-a")
55
+ params = tool._build_params("test query", engine="legacy-b", time_range="month")
56
56
 
57
- assert params["engine"] == "duckduckgo"
57
+ assert params["engine"] == "legacy-b"
58
58
  assert params["time_range"] == "month"
59
59
 
60
60
 
@@ -1,10 +0,0 @@
1
- """SERPEX integration for LangChain.
2
-
3
- This module provides tools for searching the web using the SERPEX API,
4
- which supports multiple search engines including Google, Bing, DuckDuckGo,
5
- Baidu, and Yandex.
6
- """
7
-
8
- from langchain_serpex_python.tools import SerpexSearchResults
9
-
10
- __all__ = ["SerpexSearchResults"]