Commit Graph

75 Commits

Author SHA1 Message Date
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
Sergio Paniego Blanco f26d77ca2f
Qwen2-VL model typo fixed (#349) 2025-01-28 09:45:25 +01:00
Aymeric Roucher 4579a6f7cc
TransformersModel auto-detects VLMs (#378)
* TransformersModel auto-detects VLMs
2025-01-27 20:09:14 +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
Touseef Ahmad 7e9f6e5edb
RAG on your huggingface_doc data using chromadb and groq api (#235)
* RAG on your PDF data using chromadb and groq api

* Multiple embeeding and llm support

* Multiple embedding and llm support

* Default embeddings set to hugging face

* organize imports

* huggingface_doc data source added

* Update and rename Local_PDF_RAG_using_chromadb.py to rag_using_chromadb.py

* Quality fix

* Default agent set to CodeAgent
2025-01-23 09:41:43 +01:00
Touseef Ahmad a806f50ef2
Multiple tool example (#293)
* Update guided_tour.md (#287)

* Example for calling multiple tools from ToolCallingAgent

* CodeAgent added

* Default agent set to CodeAgent and Qualitty fix

* Rename file
2025-01-23 08:55:02 +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
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
stackviolator a4ec1e5be3
Return textboxes on file upload errors (#214) 2025-01-16 16:33:01 +01:00
Albert Villanova del Moral 2a69f1574e
Fix vanilla model answer in example benchmark (#219) 2025-01-16 12:04:41 +01:00
Albert Villanova del Moral 2ae590edf4
Rename the benchmark dataset split from train to test (#216) 2025-01-16 09:57:00 +01:00
Albert Villanova del Moral 4449c51cad
Align data types in example benchmark (#205) 2025-01-16 09:54:47 +01:00
Aymeric Roucher 25e00c6e74
Document OpenTelemetry (#204) 2025-01-15 16:07:34 +01:00
Aymeric Roucher 5f32373551
Make default tools more robust (#186) 2025-01-14 14:57:11 +01:00
Aymeric 1d846072eb Improve GradioUI file upload system 2025-01-13 19:46:36 +01:00
Aymeric Roucher c611dfc7e5
Clean local python interpreter: propagate imports (#175) 2025-01-13 17:23:03 +01:00
stackviolator 2a51efe11f
Add option to upload files to GradioUI (#138)
* Add option to upload files to GradioUI
2025-01-13 16:33:45 +01:00
Aymeric Roucher fec65e154a
More flexible verbosity level (#150) 2025-01-10 23:46:22 +01:00
Aymeric Roucher cf04285cc1
Enable smolagent tools in Hugging Chat! 🚀 (#132)
* Add correct signature, api_name, and description
2025-01-09 15:15:06 +01:00
Aymeric Roucher e1414f6653
Remove dependency on LiteLLM (#126) 2025-01-08 22:57:55 +01:00
Aymeric Roucher d3cd0f9e09
Auto correct wrong assignments to final_answer (#123)
* Auto correct wrong assignments to final_answer
2025-01-08 19:04:11 +01:00
Aymeric c22fedaee1 Sort imports and add test workflows 2025-01-06 21:48:15 +01:00
Aymeric e9119c9df5 Replace max_iteration with max_steps for consistency 2025-01-06 17:25:45 +01:00
Aymeric Roucher dbb8b7f5ce
Fix examples/tool_calling_agent_ollama.py 2025-01-06 14:59:21 +01:00
Aymeric 3b600dbfb8 Clean benchmark further 2024-12-31 18:39:59 +01:00
Aymeric 65a93870cc Remove docker example 2024-12-31 18:31:20 +01:00
Aymeric 8646697c73 Clean benchmark 2024-12-31 18:30:11 +01:00
Aymeric ea77a7716b Typo 2024-12-31 17:37:54 +01:00
Aymeric dd1e0c50b6 Fix ollama example model_id 2024-12-31 17:37:00 +01:00
Aymeric 29585e801c Add benchmark 2024-12-31 15:40:19 +01:00
Robert Haase 8d388ed217 simplify example code 2024-12-30 12:48:56 +01:00
Robert Haase 56a4592521 add example using ollama 2024-12-30 12:41:20 +01:00
Aymeric 82edb4ed93 Improve prompts 2024-12-27 15:23:07 +01:00
Aymeric 654f0047f3 Improve Readme example 2024-12-26 19:00:09 +01:00
Aymeric f8b9cb34f9 Fix additional args sent to e2b server 2024-12-26 17:59:15 +01:00
Aymeric 1abaf69b67 Make RAG example extremely fast with BM25 2024-12-26 16:19:31 +01:00
Aymeric eecd728668 Improve RAG example 2024-12-26 15:33:40 +01:00
Aymeric e5ca0f0cb8 Support optional arguments in tool calls 2024-12-26 11:55:20 +01:00
Aymeric 8005d6f21d Change name 'llm_engine' to 'model' 2024-12-25 21:51:43 +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 162d4dc362 Add standard call to LiteLLM engine 2024-12-24 19:55:34 +01:00
Aymeric 1e357cee7f Add LiteLLM engine 2024-12-24 17:34:14 +01:00
Aymeric a3cd9158a7 Fix SQL example 2024-12-24 11:58:36 +01:00
Aymeric edb0be3adf Change all names to 'smolagent' 2024-12-24 10:31:36 +01:00
Aymeric d389f11e37 Add transcriber tool and PipelineTool 2024-12-23 22:49:32 +01:00