transformers/docs/source/zh
Aymeric Roucher 0ba15cedbc
Reboot Agents (#30387)
* Create CodeAgent and ReactAgent

* Fix formatting errors

* Update documentation for agents

* Add custom errors, improve logging

* Support variable usage in ReactAgent

* add messages

* Add message passing format

* Create React Code Agent

* Update

* Refactoring

* Fix errors

* Improve python interpreter

* Only non-tensor inputs should be sent to device

* Calculator tool slight refactor

* Improve docstrings

* Refactor

* Fix tests

* Fix more tests

* Fix even more tests

* Fix tests by replacing output and input types

* Fix operand type issue

* two small fixes

* EM TTS

* Fix agent running type errors

* Change text to speech tests to allow changed outputs

* Update doc with new agent types

* Improve code interpreter

* If max iterations reached, provide a real answer instead of an error

* Add edge case in interpreter

* Add safe imports to the interpreter

* Interpreter tweaks: tuples and listcomp

* Make style

* Make quality

* Add dictcomp to interpreter

* Rename ReactJSONAgent to ReactJsonAgent

* Misc changes

* ToolCollection

* Rename agent's logger to self.logger

* Add while loops to interpreter

* Update doc with new tools. still need to mention collections

* Add collections to the doc

* Small fixes on logs and interpretor

* Fix toolbox return type

* Docs + fixup

* Skip doctests

* Correct prompts with improved examples and formatting

* Update prompt

* Remove outdated docs

* Change agent to accept Toolbox object for tools

* Remove calculator tool

* Propagate removal of calculator in doc

* Fix 2 failing workflows

* Simplify additional argument passing

* AgentType audio

* Minor changes: function name, types

* Remove calculator tests

* Fix test

* Fix torch requirement

* Fix final answer tests

* Style fixes

* Fix tests

* Update docstrings with calculator removal

* Small type hint fixes

* Update tests/agents/test_translation.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update tests/agents/test_python_interpreter.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/default_tools.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/tools.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update tests/agents/test_agents.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/models/bert/configuration_bert.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/tools.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/speech_to_text.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update tests/agents/test_speech_to_text.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update tests/agents/test_tools_common.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* pygments

* Answer comments

* Cleaning up

* Simplifying init for all agents

* Improving prompts and making code nicer

* Style fixes

* Add multiple comparator test in interpreter

* Style fixes

* Improve BERT example in documentation

* Add examples to doc

* Fix python interpreter quality

* Logging improvements

* Change test flag to agents

* Quality fix

* Add example for HfEngine

* Improve conversation example for HfEngine

* typo fix

* Verify doc

* Update docs/source/en/agents.md

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/agents.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/prompts.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update src/transformers/agents/python_interpreter.py

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Update docs/source/en/agents.md

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* Fix style issues

* local s2t tool

---------

Co-authored-by: Cyril Kondratenko <kkn1993@gmail.com>
Co-authored-by: Lysandre <lysandre@huggingface.co>
Co-authored-by: Lysandre <lysandre.debut@reseau.eseo.fr>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-05-07 12:59:49 +02:00
..
internal v4.39 deprecations 🧼 (#29492) 2024-03-07 10:44:43 +00:00
main_classes Reboot Agents (#30387) 2024-05-07 12:59:49 +02:00
tasks Remove task guides auto-update in favor of links towards task pages (#30429) 2024-04-24 09:38:10 +02:00
_toctree.yml [i18n-zh] Translate add_new_pipeline.md into Chinese (#29432) 2024-03-05 09:19:00 -08:00
accelerate.md Translated the accelerate.md file of the documentation to Chinese (#26161) 2023-10-11 10:54:22 -07:00
add_new_pipeline.md [i18n-zh] Translate add_new_pipeline.md into Chinese (#29432) 2024-03-05 09:19:00 -08:00
autoclass_tutorial.md doc: Correct spelling mistake (#30107) 2024-04-08 08:44:05 +01:00
big_models.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
chat_templating.md [docs] Remove broken ChatML format link from chat_templating.md (#29643) 2024-03-13 13:04:51 -07:00
contributing.md Remove add-new-model in favor of add-new-model-like (#30424) 2024-04-24 09:38:18 +02:00
create_a_model.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
custom_models.md 🌐 [i18n-ZH] Translate custom_models.md into Chinese (#27065) 2023-10-25 11:20:32 -07:00
debugging.md translate debugging.md to chinese (#27374) 2023-11-08 14:04:06 -08:00
fast_tokenizers.md [i18n-ZH] Translated fast_tokenizers.md to Chinese (#26910) 2023-10-18 10:45:41 -07:00
fsdp.md [i18n-zh] Translate fsdp.md into Chinese (#29305) 2024-02-27 11:26:57 -08:00
hpo_train.md translate hpo_train.md and perf_hardware.md to chinese (#27431) 2023-11-14 09:57:17 -08:00
index.md [i18n-zh] Sync source/zh/index.md (#29331) 2024-02-28 09:41:18 -08:00
installation.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
llm_tutorial.md translate model_sharing.md and llm_tutorial.md to chinese (#27283) 2023-11-07 15:34:33 -08:00
model_sharing.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
multilingual.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
peft.md translate peft.md to chinese (#27215) 2023-11-02 10:42:29 -07:00
perf_hardware.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
perf_torch_compile.md Perf torch compile (#27422) 2023-11-13 09:46:40 -08:00
performance.md translate big_models.md and performance.md to chinese (#27334) 2023-11-08 08:48:46 -08:00
pipeline_tutorial.md More fixes for doctest (#30265) 2024-04-16 11:58:55 +02:00
preprocessing.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
quicktour.md [#29174] ImportError Fix: Trainer with PyTorch requires accelerate>=0.20.1 Fix (#29888) 2024-04-08 14:21:16 +01:00
run_scripts.md Fix broken link to Transformers notebooks (#30512) 2024-04-29 10:57:51 +01:00
serialization.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
task_summary.md More fixes for doctest (#30265) 2024-04-16 11:58:55 +02:00
tf_xla.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
tflite.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
tokenizer_summary.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
torchscript.md [i18n-zh] Translated torchscript.md into Chinese (#29234) 2024-02-26 08:27:47 -08:00
training.md 🚨🚨🚨Deprecate `evaluation_strategy` to `eval_strategy`🚨🚨🚨 (#30190) 2024-04-18 12:49:43 -04:00
transformers_agents.md translate transformers_agents.md to Chinese (#27046) 2023-10-27 12:45:43 -07:00