Browse Source

Improve web_fetch tool

pull/7730/head
Thomas Kaul 2 days ago
parent
commit
ac84beab07
  1. 8
      apps/api/src/services/fetch/fetch.service.ts

8
apps/api/src/services/fetch/fetch.service.ts

@ -173,9 +173,7 @@ export class FetchService implements OnModuleInit {
try {
JSON.parse(body);
} catch {
if (!rejectedBody) {
rejectedBody = body;
}
continue;
}
@ -195,9 +193,9 @@ export class FetchService implements OnModuleInit {
);
this.logger.debug(
`Web fetch tool response for ${this.redactUrl(
url
)}: ${this.getBodyPreview(rejectedBody)}`
`Web fetch tool response for ${this.redactUrl(url)} (${
sources?.length ?? 0
} sources): ${this.getBodyPreview(rejectedBody || text)}`
);
return undefined;

Loading…
Cancel
Save