@faapi/faapi 5.4.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -419,15 +419,24 @@ interface AgentConfig {
|
|
|
419
419
|
* 可见性过滤(authHooks):LLM 可见 tools 清单组装完成后调用,
|
|
420
420
|
* 返回过滤后的数组(含 agent-as-tool 项)。每次 agent.run / stream 生效——
|
|
421
421
|
* 无权 tool 不进 LLM 视野,比执行时拒绝省一轮 LLM 调用。
|
|
422
|
+
*
|
|
423
|
+
* tools 为 OpenAI chat completions 规范形(`type: 'function'` +
|
|
424
|
+
* `function: { name, description?, parameters? }`),按 `tool.function.name` 过滤。
|
|
422
425
|
*/
|
|
423
426
|
filterTools?: (tools: Array<{
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
+
type: 'function';
|
|
428
|
+
function: {
|
|
429
|
+
name: string;
|
|
430
|
+
description?: string;
|
|
431
|
+
parameters?: Record<string, unknown>;
|
|
432
|
+
};
|
|
427
433
|
}>, ctx: FaapiContext | undefined) => Array<{
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
434
|
+
type: 'function';
|
|
435
|
+
function: {
|
|
436
|
+
name: string;
|
|
437
|
+
description?: string;
|
|
438
|
+
parameters?: Record<string, unknown>;
|
|
439
|
+
};
|
|
431
440
|
}>;
|
|
432
441
|
}
|
|
433
442
|
/**
|