smolagents/tests
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
..
fixtures Pass tests 2024-12-11 19:23:07 +01:00
__init__.py Initialize repo structure. 2024-12-06 17:46:42 +01:00
test_agents.py Add VLM support (#220) 2025-01-24 17:01:35 +01:00
test_all_docs.py Add linter rules + apply make style (#255) 2025-01-18 19:01:15 +01:00
test_default_tools.py Make import time faster (optional deps + delay imports) (#253) 2025-01-20 10:59:43 +01:00
test_final_answer.py Make import time faster (optional deps + delay imports) (#253) 2025-01-20 10:59:43 +01:00
test_function_type_hints_utils.py Support any and none tool types (#280) 2025-01-22 12:47:05 +01:00
test_models.py Add VLM support (#220) 2025-01-24 17:01:35 +01:00
test_monitoring.py minor fix for console in AgentLogger (#303) 2025-01-22 10:41:05 +01:00
test_python_interpreter.py Refactor evaluate_augassign and test all operators (#313) 2025-01-22 14:59:09 +01:00
test_search.py Support OpenTelemetry (#136) 2025-01-09 23:08:17 +01:00
test_tools.py Support any and none tool types (#280) 2025-01-22 12:47:05 +01:00
test_types.py Make import time faster (optional deps + delay imports) (#253) 2025-01-20 10:59:43 +01:00
test_utils.py Fix: source code inspection in interactive shells (#281) 2025-01-22 13:43:16 +01:00