Skip to content
English

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

字段结构 ​

字段类型必需说明
idstring必需Provider call id; only unique within the response.
namestring必需Function name exactly as returned by the model.
argumentsstring必需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;
}

接口参考、使用示例与开发指南。