Commit Graph

61 Commits

Author SHA1 Message Date
Joe 9b96199d00
MLX model support (#300) 2025-02-12 18:30:25 +01:00
Albert Villanova del Moral dbd1e3c1b2
Bump dev version: v1.9.0.dev0 (#544) 2025-02-07 16:11:05 +01:00
Albert Villanova del Moral 64b99724db
Delete non-exisiting accelerate extra (#539) 2025-02-07 15:48:38 +01:00
Albert Villanova del Moral fd9eec8433
Pin openinference-instrumentation-smolagents >= 0.1.4 (#535) 2025-02-07 15:09:01 +01:00
Albert Villanova del Moral 127a042cfb
Fix installation with data files (#536) 2025-02-07 13:44:42 +01:00
Taha Yassine 90c30fa62b
Bump litellm to 1.60.2 (fixes #34) (#488) 2025-02-05 11:43:02 +01:00
Albert Villanova del Moral e26aed68e8
Bump dev version: v1.8.0.dev0 (#451) 2025-01-31 14:21:02 +01:00
Aymeric Roucher 023419bf92
Add web search tool and make prompt positional arg (#435) 2025-01-30 18:13:08 +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
Abubakar Abid b1742ed06c
Update pyproject.toml (#408) 2025-01-29 18:39:11 +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
Albert Villanova del Moral 022947a2a5
Bump dev version: v1.7.0.dev0 (#390) 2025-01-28 12:06:07 +01:00
Aymeric Roucher 49c34f625c
Gradio chatbot: step duration, number, token count, support nested thoughts (#384)
* Add enhanced Gradio UI with nested agents calls, execution-logs, errors
- Add virtual separation between steps
- Highlight final answer as required in internal discussion
- Show step numbers and token counts
- Include step duration tracking
- Improve message display structure
---------

Co-authored-by: Yuvraj Sharma <48665385+yvrjsharma@users.noreply.github.com>
2025-01-28 09:24:13 +01:00
Albert Villanova del Moral ce763ff756
Bump version to 1.6.0.dev (#348) 2025-01-24 17:55:55 +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
Alex Bason 73621c9cd1
Move torchvision to the torch extra (#297) 2025-01-24 14:31:10 +01:00
Antoine Jeannot 6196958deb
Fix: source code inspection in interactive shells (#281)
* Support interactive shells for source inspection
* Add tool save e2e tests
2025-01-22 13:43:16 +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
Albert Villanova del Moral fb23e91a21
Add huggingface-hub as required dependency (#288) 2025-01-21 10:50:08 +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
Aymeric Roucher a2ca95107f
Bump version to 1.5.0.dev (#256)
* Bump version to 1.5.0.dev

* Fix style

---------

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-20 10:59:16 +01:00
Lucain 6e1373a324
Add linter rules + apply make style (#255)
* Add linter rules + apply make style
2025-01-18 19:01:15 +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
Albert Villanova del Moral 68933e7e90
Make openai dependency optional (#236)
* Make openai optional dependency

* Set openai as an extra dependency
2025-01-17 16:46:18 +01:00
Lucain 1f8fd72acb
Clean makefile, pyproject.toml and CI (#229)
* Clean makefile / pyproject.toml / .github

* new tests after

* add back sqlalchemy

* disable docs tests in CI

* continue on error

* correct continue on error

* Remove all_docs test
2025-01-17 13:18:06 +01:00
Aymeric 369d066c9d Bump version following release of 1.3.0 2025-01-15 17:32:23 +01:00
Aymeric 4e80e1b79a Bump version following release of 1.2.0 2025-01-10 16:24:40 +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
Aymeric Roucher e1414f6653
Remove dependency on LiteLLM (#126) 2025-01-08 22:57:55 +01:00
Zetaphor b4528d6a6f
Implement OpenAIServerModel (#109) 2025-01-08 22:39:41 +01:00
Aymeric 7b191952f8 Update version and doc builder 2025-01-07 14:02:01 +01:00
Aymeric d45c63555f Pass more tests 2025-01-06 22:04:00 +01:00
Aymeric 01abe5921a Add accelerate to test requirements 2025-01-06 21:59:27 +01:00
Aymeric c22fedaee1 Sort imports and add test workflows 2025-01-06 21:48:15 +01:00
Aymeric a3df1a21db Bump release number for 1.0.0 2024-12-31 19:35:41 +01:00
Aymeric 05772cb28c Remove gradio tools from doc 2024-12-31 19:29:22 +01:00
Aymeric 329119b716 Fix f-string issues on python<3.12 2024-12-29 22:54:28 +01:00
Aymeric 132f9f3e6a Update torchvision 2024-12-27 17:19:07 +01:00
Aymeric 86c8d28830 Update pyproject 2024-12-27 16:46:32 +01:00
Aymeric b51c490a2a Update version 2024-12-27 16:36:50 +01:00
Aymeric d5a036d3f2 Pass tests 2024-12-27 16:27:16 +01:00
Aymeric c880f2f5b6 Format 2024-12-27 16:18:19 +01:00
Aymeric df89388147 Fix tool forward args with defaults but no type hint 2024-12-26 12:32:23 +01:00
Aymeric 9863155a94 Update readme 2024-12-26 12:10:17 +01:00
Aymeric 3a70e17cae Remove direct support for openai and anthropic engines, one can use LiteLLM 2024-12-24 23:36:46 +01:00
Aymeric 775f6e8d7f Make doc buildable with new names 2024-12-24 12:18:18 +01:00
Aymeric 77428c8e9c Merge MultiStepAgent and BaseAgent 2024-12-24 12:01:32 +01:00
Aymeric edb0be3adf Change all names to 'smolagent' 2024-12-24 10:31:36 +01:00