Commit Graph

145 Commits

Author SHA1 Message Date
Jannik Maierhöfer e27e83f645
docs: add Langfuse OpenTelemetry guide (#601) 2025-02-12 19:08:05 +01:00
Joe 9b96199d00
MLX model support (#300) 2025-02-12 18:30:25 +01:00
Albert Villanova del Moral 833aec9198
Refactor and test final answer prompts (#595) 2025-02-12 09:30:26 +01:00
Albert Villanova del Moral 02b2b7ebb9
Create PromptTemplates typed dict (#547) 2025-02-12 08:45:56 +01:00
Albert Villanova del Moral af665c300c
Remove unused import in guided_tour docs (#600) 2025-02-11 10:55:35 +01:00
Touseef Ahmad 3a90bd7164
Minor fix in the guilded_tour docs (#578) 2025-02-10 08:02:44 +01:00
Parteek 881ce13635
Fix managed agent example (#562)
Co-authored-by: Aymeric Roucher <69208727+aymeric-roucher@users.noreply.github.com>
2025-02-09 17:10:51 +01:00
Derek Alia 3fc2d0e4e8
Fix multiagents docs (#549) 2025-02-09 16:20:23 +01:00
Sean Callan 63adfcd836
Minor grammar correction (#528) 2025-02-08 21:33:38 +01:00
Juan Villa fe92c82cb8
Doc grammar fix (#556) 2025-02-08 21:31:58 +01:00
Sergio Paniego Blanco b6ad9a4bc6
Small update to 'Introduction to Agents' docs format (#548) 2025-02-07 19:01:38 +01:00
Aymeric Roucher ec66b56550
Fix some doc examples (#542) 2025-02-07 15:50:46 +01:00
Touseef Ahmad f09b17f86d
Add doc for FinalAnswerTool, GoogleSearchTool, SpeechToTextTool (#516) 2025-02-06 14:05:13 +01:00
Sergio Paniego Blanco a6d2cdaaef
Added HfApiModel import to web browser example (#461) 2025-02-04 12:34:15 +01:00
Aymeric Roucher d69ae028fa
Simplify managed agents (#484)
* Simplify managed agents
2025-02-03 21:19:54 +01:00
Aymeric Roucher 44f94eaa2d
Improve Readme: shorter intro, VLMs, MCP, etc (#459)
* Improve Readme: shorter intro, VLMs, MCP, etc
2025-02-03 11:13:49 +01:00
Aymeric Roucher b453d63f33
Add web browser example to doc (#439) 2025-01-31 13:47:45 +01:00
Sanjeed aa55f137e5
Remove explicit model arg in HfApiModel - which wouldn't run without Pro (#373)
* Remove explicit model arg in HfApiModel - which wouldn't run without Pro
2025-01-30 18:55:09 +01:00
Aymeric Roucher fa1f8d0154
Add CLI for smolagents (#431)
---------

Co-authored-by: Merve Noyan <merveenoyan@gmail.com>
2025-01-30 15:56:50 +01:00
Julien Chaumond d3912c70cf
Support third-party Inference providers in `HfApiModel` (#422)
* Add `provider` param to `HfApiModel `, update guided_tour.md

---------

Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
2025-01-30 01:03:09 +01:00
Clémentine Fourrier c6eb9526f1
Untangling Logging (#316)
* Deep refacto that disentangled logging logic between logging (informing the user via console outputs) and memory (storing what happened in the agent).

---------

Co-authored-by: benediktstroebl <50178209+benediktstroebl@users.noreply.github.com>
Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
2025-01-29 16:27:04 +01:00
Graham 242a6e59c5
Docs: Text to sql example - minor naming / dedupe (#376)
* Fix up minor naming oddities

Dedupe insert row logic

* Improve readability
2025-01-28 10:43:06 +01:00
Fanwang Meng 216ec1a0ae
Add Chinese translations for RAG (#363) 2025-01-28 09:43:06 +01:00
Fanwang Meng 16cfbdcfdf
Add Chinese translations for text-to-sql example (#366) 2025-01-28 09:42:36 +01:00
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