feat: настройки агента
- toolChoice: auto | none | required | имя инструмента (только первый запрос хода, иначе required не даёт модели закончить) - parallelToolCalls: запрет батчинга вызовов - historyLimit: обрезка истории целыми ходами, system и вопрос сохраняются - toolApproval: хук подтверждения перед выполнением инструмента - Agent::fromEnv() и AI_* переменные для всех настроек - пример 05-settings.php, 26 тестов
This commit is contained in:
1 parent
ef590d669e
commit
0b1bbbc0e7
7 files changed
+521
-36
No files matched your search
+5
-1
@@ -13,6 +13,10 @@ interface ChatClient
|
||||
/**
|
||||
* @param list<array<string, mixed>> $messages история диалога
|
||||
* @param list<array<string, mixed>> $tools определения в формате OpenAI
|
||||
* @param array<string, mixed> $options
|
||||
* tool_choice — 'auto' | 'none' | 'required' | имя функции
|
||||
* parallel_tool_calls — разрешить модели батчить вызовы
|
||||
* temperature, max_tokens — переопределить настройки клиента
|
||||
*/
|
||||
public function chat(array $messages, array $tools = []): ChatResult;
|
||||
public function chat(array $messages, array $tools = [], array $options = []): ChatResult;
|
||||
}
|
||||
Reference in new issue
Block a user