refactor: убрать onAnswer из хуков агента
- onAnswer дублировал возврат Agent::ask() — убран - остались onStep, onToolStart, onToolEnd, shouldStop - пример 14 печатает ответ из возврата ask() - 116 тестов
This commit is contained in:
1 parent
4c25111c0e
commit
204d449519
7 files changed
+15
-27
No files matched your search
+2
-1
@@ -18,7 +18,7 @@
|
||||
| `11-json.php` | инструменты без модели | `json_query`, `convert_units`, `date_calc`, `uuid`, `hash_text` | — |
|
||||
| `12-logging.php` | логи запросов | `get_time`, `calculator` | `verbose`, `sink` |
|
||||
| `13-code-task.php` | агент пишет код и проверяет тестом | `read_file`, `write_file`, `replace_in_file`, `list_dir`, `run_command` | `workdir`, `allow`, `maxRounds` |
|
||||
| `14-hooks.php` | прогресс и остановка | `get_time`, `calculator` | `hooks`: onStep, onToolStart, onToolEnd, onAnswer, shouldStop |
|
||||
| `14-hooks.php` | прогресс и остановка | `get_time`, `calculator` | `hooks`: onStep, onToolStart, onToolEnd, shouldStop |
|
||||
|
||||
`10-http.php` и `11-json.php` работают без модели и без сети — их можно запускать
|
||||
где угодно. Остальные обращаются к модели из `.env`.
|
||||
@@ -26,3 +26,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user