NativeFunctionCall
CORE · interface · 类型合同
Request-local native call buffer; never an execution receipt.
导入
ts
import type { NativeFunctionCall } from '@jangts/agent-core/support';js
/** @typedef {import('@jangts/agent-core/support').NativeFunctionCall} NativeFunctionCall */其他公开入口:@jangts/agent-core/types、@jangts/agent-core/structs、@jangts/agent-core/support、@jangts/agent-core/support/model。
定义
ts
interface NativeFunctionCall字段结构
| 字段 | 类型 | 必需 | 说明 |
|---|---|---|---|
id | string | 必需 | Provider call id; only unique within the response. |
name | string | 必需 | Function name exactly as returned by the model. |
arguments | string | 必需 | Raw JSON argument text, validated only when the selection is parsed. |
类型使用
在调用方读取该合同
ts
import type { NativeFunctionCall } from '@jangts/agent-core/support';
// 在使用点保留原合同,TS 与 JS 具有相同的运行行为。
function inspect(value: NativeFunctionCall) {
return value.id;
}js
/** @param {import('@jangts/agent-core/support').NativeFunctionCall} value */
function inspect(value) {
return value.id;
}