Commit Graph

121 Commits

Author SHA1 Message Date
Touseef Ahmad 68f3da12ea
Minor Fix in the example docs (#383) 2025-01-28 08:55:39 +01:00
Touseef Ahmad dca7081394
Separate tree for Model docs is added (#382) 2025-01-28 08:44:15 +01:00
Sanjeed 5edf940cd9
Add pip install datasets to RAG example (#371) 2025-01-27 16:30:56 +01:00
Merve Noyan 408b52abec
Add VLM support (#220)
* vlm initial commit

* transformers integration for vlms

* Add webbrowser example and make it work 🥳🥳

* Refactor image support

* Allow modifying agent attributes in callback

* Improve vlm browser example

* time.sleep(0.5) before screenshot to let js animations happen

* test to validate internal workflow for passing images

* Update test_agents.py

* Improve error logging

* Switch to OpenAIServerModel

* Improve the example

* Format

* add docs about steps, callbacks & co

* Add precisions in doc

* Improve browser

* Tiny prompting update

* Fix style

* fix/add test

* refactor

* Fix write_inner_memory_from_logs for OpenAI format

* Add back summary mode

* Make it work with TransformersModel

* Fix test

* Fix loop

* Fix quality

* Fix mutable default argument

* Rename tool_response_message to error_message and append it

* Working browser with firefox

* Use flatten_messages_as_text passed to TransformersModel

* Fix quality

* Document flatten_messages_as_text in docstring

* Working ctrl + f in browser

* Make style

* Fix summary_mode type hint and add to docstring

* Move image functions to tools

* Update docstrings

* Fix type hint

* Fix typo

* Fix type hints

* Make callback call compatible with old single-argument functions

* Revert update_metrics to have a single arg

* Pass keyword args instead of args to callback

* Update webbrowser

* fix for single message case where final message list is empty

* forgot debugger lol

* accommodate VLM-like chat template and fix tests

* Improve example wording

* Style fixes

* clarify naming and fix tests

* test fix

* Fix style

* Add bm25 to fix one of the doc tests

* fix mocking in VL test

* fix bug in fallback

* add transformers model

* remove chrome dir from helium

* Update Transformers example with flatten_messages_as_text

* Add doc for flatten_messages_as_text

* Fix merge error

---------

Co-authored-by: Merve Noyan <mervenoyan@Merve-MacBook-Pro.local>
Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-24 17:01:35 +01:00
Albert Villanova del Moral 0217d3fd58
Fix MultiStepAgent docstring (#336)
* Fix MultiStepAgent docstring

* Force PR doc build
2025-01-23 17:38:09 +01:00
Albert Villanova del Moral 696b885976
Add args to MultiStepAgent docstring (#332)
* Add args to MultiStepAgent docstring
2025-01-23 12:54:50 +01:00
Vlad Iliescu a721837c57
Add Azure OpenAI support (#282)
* Added support for connecting to Azure OpenAI via AzureOpenAIServerModel
2025-01-22 10:44:18 +01:00
David Berenstein 428aedde93
Update README and documentation to clarify Hub integrations with Gradio Spaces and fix code snippet formatting (#306)
- Changed the description of Hub integrations to specify sharing and loading of Gradio Spaces as tools.
- Fixed a formatting issue in the code snippet by removing an extraneous comma in the import statement.
2025-01-22 09:28:15 +01:00
Aymeric Roucher cfbd527438
Add cool GIF of agent run inspection using Phoenix (#277)
* Add cool GIF of agent run inspection using Phoenix
2025-01-21 13:43:48 +01:00
Albert Villanova del Moral 16f7910df8
Make e2b optional dependency (#292)
* Make e2b optional dependency with extra

* Make e2b imports optional

* Update e2b docs
2025-01-21 12:17:24 +01:00
Sanjeed 257c1fe33b
Update guided_tour.md (#287) 2025-01-21 11:18:45 +01:00
Derek Alia 1e745c7a34
Update building_good_agents.md (#283) 2025-01-21 11:03:51 +01:00
Parteek bd08d6485d
Added Hindi docs for smolagents (#279) 2025-01-20 19:30:31 +01:00
Lucain d19ebc7a48
Make import time faster (optional deps + delay imports) (#253)
* adapt docs

* optional in pyproject.toml

* get rid of some transformers imports

* optional transformers in models.py

* gradio, transformers, litellm

* small refacto AgentType

* merge conflicts

* mouaif

* fix tests

* AgentText no longer a str

* Add back AgentType as str/Image

* fixed for good
2025-01-20 10:59:43 +01:00
RolandJAAI 06a8c546b9
fix additional_args and num_ctx examples also in zh docs (#260) 2025-01-18 19:09:50 +01:00
Aymeric Roucher e3ae1800e2
Fixes before release (#254)
* Fixes before release
2025-01-17 20:20:28 +01:00
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
Moritz Laurer 7d6599e430
docs: small fixes in docs (#245) 2025-01-17 19:20:25 +01:00
Fanwang Meng 3e1c979dac
Add Chinese translations for multi-agent example (#246)
* Add first complete Chinese translation
2025-01-17 19:12:59 +01:00
RolandJAAI e30ec8ac91
Set ollama context lenght in example to 8192 to make it work (#252)
* set ollama context length in example
2025-01-17 18:41:34 +01:00
matterattetatte c56d73731d
Dead Link to Duck Duck Go search tool (#233)
* Update multiagents.md URL to DuckDuckGo
2025-01-16 23:04:40 +01:00
Aymeric Roucher b4091cb5ce
Allow passing kwargs to all models (#222)
* Allow passing kwargs to all models
2025-01-16 23:03:38 +01:00
RolandJAAI a1d8f3c398
fix tool example with additional args (#228) 2025-01-16 23:00:11 +01:00
Aymeric 96ebe01dc7 Add license_to_call graphic to documentation index 2025-01-16 11:48:16 +01:00
Aymeric 98c6688c3d Add pip install for instrumentation 2025-01-16 09:39:28 +01:00
Ruggero Rossi 4c5f1fe4b4
fix typo in building_good_agents.md (#193)
Change function get_coordinates_from_location to convert_location_to_coordinates
2025-01-15 18:04:54 +01:00
Aymeric Roucher e5c054cc5b
Pre-release fixes (#207) 2025-01-15 16:56:12 +01:00
Aymeric Roucher 25e00c6e74
Document OpenTelemetry (#204) 2025-01-15 16:07:34 +01:00
Albert Villanova del Moral 1f96560c92
Fix minor issues in building_good_agents docs (#170)
* Fix doc inter-link to intro_agents in building_good_agents, make text italic, minor typos
2025-01-13 17:26:32 +01:00
duydl 67ee777370
Fix minor docs (#173) 2025-01-13 16:31:36 +01:00
Ayuilos c0496dc6bc
[i18n] Add Chinese translation(`zh`) for smolagents (#156)
* Add Chinese version (`zh`) of the documentation for smolagents
2025-01-13 16:24:23 +01:00
sid tuladhar 60b1abdae6
Fixed agents.md (#164)
Fix docs: custom_model should return an object that has a .content attribute
2025-01-13 16:21:51 +01:00
Aymeric Roucher fec65e154a
More flexible verbosity level (#150) 2025-01-10 23:46:22 +01:00
Aymeric Roucher eca83800e3
Halve import time by removing torch dependency (#147)
* Halve import time by removing torch dependency
2025-01-10 15:00:28 +01:00
GamifyAI.ai d8a4b831bb
Fix several typos in docs. (#140) 2025-01-10 13:00:24 +01:00
Aymeric Roucher 5c33130fa4
Vastly simplify Model class (#146)
* Vastly simplify Model class by making only one __call__ method 
2025-01-10 12:30:59 +01:00
Aymeric Roucher cb9830a554
Support OpenTelemetry (#136)
* Support OpenTelemetry
2025-01-09 23:08:17 +01:00
Izaak Curry 6b8467c546
Fix Spelling Errors in Documentation (#99)
* Update docs/tutorials/tools.md
2025-01-07 14:07:30 +01:00
Omar Irfan Khan 10e0db06e0
fixing spelling and grammar for query in docs/examples/multiagents.md (#98) 2025-01-07 14:05:06 +01:00
Derek Alia f6ed22561a
Update rag.md with missing verb
Missing verb in “The agent can the generated snippets ...”

Original:
“The agent can the generated snippets and re-retrieve if needed, as in Self-Query.”

Fix:

“The agent can use the generated snippets and re-retrieve if needed, as in Self-Query.”
2025-01-06 16:16:58 -08:00
Aymeric Roucher dd2896e887
Merge pull request #92 from DarwinAnim8or/patch-1
Include missing pip install library in RAG example
2025-01-06 22:42:10 +01:00
Aymeric Roucher 723582aacf
Update rag.md 2025-01-06 22:30:29 +01:00
Aymeric Roucher b1353720af
Merge pull request #89 from alxfgh/fix-doc-tutorial-errors
Fixed typos and grammatical errors in building_good_agents.md
2025-01-06 22:28:45 +01:00
Gie "Max" Vanommeslaeghe 1f11b9569c
Include missing pip install library 2025-01-06 22:08:56 +01:00
Aymeric 10fee97902 Update test workflows 2025-01-06 21:05:41 +01:00
Alexander Feghali 5de8d442e3 Fixed grammatical errors in building_good_agents.md tutorial 2025-01-06 14:35:59 -05:00
Aymeric 0824785b7a Add tests for multiagent hierarchies 2025-01-06 19:24:46 +01:00
Aymeric 4fa8255377 Detail tool building options in guided tour 2025-01-06 18:27:02 +01:00
Aymeric c98cd1543d Further detail doc on LLM choice 2025-01-06 18:18:03 +01:00
Aymeric 2933ed30d5 Improve system prompt documentation 2025-01-06 18:06:33 +01:00