clientTools over webhooks (#1167)

* clientTools over webhooks

* lint

* simpler toolHook response
This commit is contained in:
Sam Machin
2025-04-23 14:15:16 +01:00
committed by GitHub
parent 63899d0091
commit 472f4f4532
2 changed files with 9 additions and 2 deletions

View File

@@ -219,7 +219,7 @@ class HttpRequestor extends BaseRequestor {
const rtt = this._roundTrip(startAt);
if (buf) this.stats.histogram('app.hook.response_time', rtt, ['hook_type:app']);
if (buf && Array.isArray(buf)) {
if (buf && (Array.isArray(buf) || type == 'llm:tool-call')) {
this.logger.info({response: buf}, `HttpRequestor:request ${method} ${url} succeeded in ${rtt}ms`);
return buf;
}