Skip to content

Commit e4f7828

Browse files
committed
use serpapi client + deps
1 parent 3812058 commit e4f7828

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

camel/toolkits/search_toolkit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ def search_serpapi(
14001400
- 'source': The source of the result
14011401
- 'error: Error if any
14021402
"""
1403-
from serpapi import GoogleSearch
1403+
from serpapi import SerpApiClient
14041404

14051405
SERPAPI_KEY = os.getenv("SERPAPI_KEY")
14061406
params = {
@@ -1420,7 +1420,7 @@ def search_serpapi(
14201420
if custom_params:
14211421
params.update(custom_params)
14221422
try:
1423-
search = GoogleSearch(params)
1423+
search = SerpApiClient(params)
14241424
results = search.get_dict()
14251425

14261426
if (

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ dependencies = [
3232
"openai>=1.86.0",
3333
"websockets>=13.0,<15.1",
3434
"astor>=0.8.1",
35+
"google-search-results>=2.4.2",
3536
]
3637

3738

@@ -521,6 +522,7 @@ exclude = [
521522
'\.venv/.*', # exclude .venv directory
522523
'site-packages/.*', # exclude site-packages
523524
]
525+
disable_error_code = ["import-untyped"]
524526

525527
[[tool.mypy.overrides]]
526528
module = [
@@ -660,6 +662,7 @@ module = [
660662
"markitdown",
661663
"httplib2",
662664
]
665+
663666
ignore_missing_imports = true
664667

665668
[tool.codespell]

uv.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)