Add test for DDGS Tool kwargs (#387)

This commit is contained in:
Aymeric Roucher 2025-01-28 11:02:21 +01:00 committed by GitHub
parent ad5f84b101
commit 7a2f300b2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import unittest
import pytest
from smolagents.default_tools import PythonInterpreterTool, VisitWebpageTool
from smolagents.default_tools import DuckDuckGoSearchTool, PythonInterpreterTool, VisitWebpageTool
from smolagents.types import _AGENT_TYPE_MAPPING
from .test_tools import ToolTesterMixin
@ -29,6 +29,10 @@ class DefaultToolTests(unittest.TestCase):
assert isinstance(result, str)
assert "* [About Wikipedia](/wiki/Wikipedia:About)" in result # Proper wikipedia pages have an About
def test_ddgs_with_kwargs(self):
result = DuckDuckGoSearchTool(timeout=20)("DeepSeek parent company")
assert isinstance(result, str)
class PythonInterpreterToolTester(unittest.TestCase, ToolTesterMixin):
def setUp(self):