Commit Graph

417 Commits

Author SHA1 Message Date
Albert Villanova del Moral 181a500c5d
Fix and test MemoryStep (#432)
* Test MemoryStep
* Remove unused MemoryStep.raw attribute
2025-01-30 21:24:39 +01:00
Albert Villanova del Moral 42d97716fe
Fix MultiStepAgent.planning_step message content (#437)
* Fix MultiStepAgent.planning_step message content
2025-01-30 21:18:30 +01:00
Albert Villanova del Moral 6d0e4e49fc
Update benchmark with Hub datasets (#412)
* Use smolagents-benchmark Hub datasets

* Push results to Hub

* Fix style

* Add Constants section at the top

* Set DATE as constant
2025-01-30 19:21:32 +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 023419bf92
Add web search tool and make prompt positional arg (#435) 2025-01-30 18:13:08 +01:00
Albert Villanova del Moral 25c5b50222
Fix import from deleted logger (#433) 2025-01-30 17:34:05 +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
Albert Villanova del Moral 595781b82d
Test memory (#428)
* Test memory

* Add memory tests to CI
2025-01-30 13:51:18 +01:00
Jan 37f549f4aa
Fix installation instruction for GradioUI in error message (#418) 2025-01-30 13:25:53 +01:00
Aymeric Roucher 20383f0914
Fix regressions, refactor logging and improve replay function (#419)
* Refactor logging and improve replay function

* Fix test

* Remode unnecessary dict method

* Remove logger import

---------

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-30 11:32:28 +01:00
Abubakar Abid c0abd2134e
Fix `vlm_web_browser.py` example (#410)
* Update `vlm_web_browser.py` example
Fixed a typo which meant that the images were never being remove for lean processing

---------

Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
2025-01-30 02:17:00 +01:00
Merve Noyan dcbbe448af
Make web browser example a CLI script (#416)
* Makes web browser example a CLI script

---------

Co-authored-by: Merve Noyan <mervenoyan@Merve-MacBook-Pro.local>
Co-authored-by: Aymeric <aymeric.roucher@gmail.com>
2025-01-30 01:55:54 +01:00
RolandJAAI 3b8e519f77
minor example fix (#423) 2025-01-30 01:04:30 +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
Abubakar Abid 882b134f35
Fix return type of generator function in `Agent._run()` (#409)
* Fix return type of generator function in `Agent._run()`
2025-01-29 15:35:32 +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 7a2f300b2a
Add test for DDGS Tool kwargs (#387) 2025-01-28 11:02:21 +01:00
Aymeric Roucher ad5f84b101
Fix blocking of os in authorized imports (#386) 2025-01-28 11:00:43 +01:00
Aymeric Roucher a4f89b68b2
Add tool saving test (#389)
* Add tool saving test

* Format
2025-01-28 10:58:53 +01:00
Albert Villanova del Moral cc21135188
Test import without extras (#370)
* Test import without extras

* Add import test to CI

* Use uv run
2025-01-28 10:57:14 +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
Parteek 33b38e6cb7
fix final_answer issue in e2b_executor (#319) 2025-01-28 10:41:32 +01:00
onukura 2105811da6
DuckDuckGoSearchTool: add ddgs_kwargs parameter to constructor (#372)
* DuckDuckGoSearchTool: add ddgs_kwargs parameter to constructor for flexible configuration
2025-01-28 10:11:33 +01:00
Touseef Ahmad 8178eeca65
Additional parameters for openai (#385) 2025-01-28 10:01:12 +01:00
Hiroto N. 42c79f21a1
fix is_torch_available function call (#379) 2025-01-28 09:50:59 +01:00
Sergio Paniego Blanco f26d77ca2f
Qwen2-VL model typo fixed (#349) 2025-01-28 09:45:25 +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
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
BUI Van Tuan 3b5c99e87a
Fix Extra planning (#362)
* fix Extra planning
2025-01-28 09:21:58 +01:00
Touseef Ahmad 68f3da12ea
Minor Fix in the example docs (#383) 2025-01-28 08:55:39 +01:00
Tobias Cabanski 525a76b836
add kwargs to gradio launch (#367) 2025-01-28 08:55:03 +01:00
Touseef Ahmad dca7081394
Separate tree for Model docs is added (#382) 2025-01-28 08:44:15 +01:00
Aymeric Roucher 4579a6f7cc
TransformersModel auto-detects VLMs (#378)
* TransformersModel auto-detects VLMs
2025-01-27 20:09:14 +01:00
Aymeric Roucher a5290590c8
Update issue templates (#377) 2025-01-27 19:04:07 +01:00
Sanjeed 5edf940cd9
Add pip install datasets to RAG example (#371) 2025-01-27 16:30:56 +01:00
Albert Villanova del Moral 39133acc90
Use transformers as optional dependency (#360) 2025-01-27 10:07:29 +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
Aymeric Roucher de7b0ee799
Improve inference choice examples (#311)
* Improve inference choice examples

* Fix style

---------

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-24 16:32:35 +01:00
RolandJAAI 0196dc7b21
fixed tool examples in prompts (#341) 2025-01-24 15:21:00 +01:00
Touseef Ahmad b5b55a5686
docstring args for ToolCallingAgent, CodeAgent and ManagedAgent (#335)
* docstring args for ToolCallingAgent, CodeAgent and ManagedAgent

* Fix ToolCallingAgent and CodeAgent docstring

* Minor fix

---------

Co-authored-by: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com>
2025-01-24 15:03:49 +01:00
Alex Bason 73621c9cd1
Move torchvision to the torch extra (#297) 2025-01-24 14:31:10 +01:00
Albert Villanova del Moral 2a2b76487b
Fix docstrings of models (#344) 2025-01-24 14:23:24 +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 b333e08f66
Update README instructions to run tests (#328) 2025-01-23 15:42:27 +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
Albert Villanova del Moral 115c8aef1e
Rename tool_response_message to error_message and append it (#325) 2025-01-23 12:45:58 +01:00