smolagents/tests
Guillaume Raille a4d029da88
add support for MCP Servers tools as `ToolCollection` (#232)
* add support for tool collection from mcp servers

* add forgotten documentation

* fix link missing in documentation

* fix linting in CI, bumpruff to use modern version

* mcpadapt added as optional dependencies

* use classmethod for from_hub and from_mcp to better reflect the fact that they return a ToolCollection

* Update src/smolagents/tools.py

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>

* Update src/smolagents/tools.py

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>

* Test ToolCollection.from_mcp

* Rename to mcp extra

* Add mcp extra to test extra

* add a test for from_mcp

* fix typo

* fix tests

* Test ToolCollection.from_mcp

(cherry picked from commit 9284d9ea8cf24d3c934e35a38dfe34f3ce31cef3)

* Make all pytest tests

---------

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-17 19:41:43 +01:00
..
fixtures Pass tests 2024-12-11 19:23:07 +01:00
__init__.py Initialize repo structure. 2024-12-06 17:46:42 +01:00
test_agents.py Fix missing python modules in CodeAgent system prompt (#226) 2025-01-17 11:59:30 +01:00
test_all_docs.py Pre-release fixes (#207) 2025-01-15 16:56:12 +01:00
test_default_tools.py Make default tools more robust (#186) 2025-01-14 14:57:11 +01:00
test_final_answer.py Sort imports and add test workflows 2025-01-06 21:48:15 +01:00
test_models.py Allow passing kwargs to all models (#222) 2025-01-16 23:03:38 +01:00
test_monitoring.py Fix import from ChatMessage in test_monitoring (#202) 2025-01-15 14:03:41 +01:00
test_python_interpreter.py Fix subpackage import vulnerability (#238) 2025-01-17 11:40:49 +01:00
test_search.py Support OpenTelemetry (#136) 2025-01-09 23:08:17 +01:00
test_tools.py add support for MCP Servers tools as `ToolCollection` (#232) 2025-01-17 19:41:43 +01:00
test_types.py Remove dependency on _is_package_available from transformers (#247) 2025-01-17 18:38:33 +01:00
test_utils.py Support multiple code blobs (#128) 2025-01-08 23:20:50 +01:00