文档
CodeRabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
类引用
函数引用
接口引用
类型别名引用
变量引用
接口引用

ClientTool

接口: ClientTool<TInput, TOutput, TName>

定义于: activities/chat/tools/tool-definition.ts:23

客户端工具的标记类型

类型参数

TInput

TInput extends SchemaInput = SchemaInput

TOutput

TOutput extends SchemaInput = SchemaInput

TName

TName extends string = string

属性

__toolSide

ts
__toolSide: "client";

定义于: activities/chat/tools/tool-definition.ts:28


描述

ts
description: string;

定义于: activities/chat/tools/tool-definition.ts:30


execute()?

ts
optional execute: (args) => 
  | InferSchemaType<TOutput>
| Promise<InferSchemaType<TOutput>>;

定义于: activities/chat/tools/tool-definition.ts:35

参数

参数

InferSchemaType<TInput>

Returns (返回)

| InferSchemaType<TOutput> | Promise<InferSchemaType<TOutput>>


inputSchema?

ts
optional inputSchema: TInput;

定义于: activities/chat/tools/tool-definition.ts:31


metadata?

ts
optional metadata: Record<string, unknown>;

定义于: activities/chat/tools/tool-definition.ts:34


name

ts
name: TName;

定义于: activities/chat/tools/tool-definition.ts:29


needsApproval?

ts
optional needsApproval: boolean;

定义于: activities/chat/tools/tool-definition.ts:33


outputSchema?

ts
optional outputSchema: TOutput;

定义于: activities/chat/tools/tool-definition.ts:32