文档
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
类引用
函数引用
接口引用
类型别名引用
变量引用
类型别名引用

AgentLoopStrategy

类型别名: AgentLoopStrategy()

ts
type AgentLoopStrategy = (state) => boolean;

定义于: types.ts:592

策略函数,用于确定代理循环是否应继续

参数

状态

AgentLoopState

代理循环的当前状态

Returns (返回)

boolean

如果为 true,则继续循环,如果为 false,则停止

示例

typescript
// Continue for up to 5 iterations
const strategy: AgentLoopStrategy = ({ iterationCount }) => iterationCount < 5;