Skip to main content

Agent.listScorers()

.listScorers() 方法获取为代理配置的评分配置,如果它是一个函数,则会解析它。此方法提供对用于评估代理响应和性能的评分系统的访问。

🌐 The .listScorers() method retrieves the scoring configuration configured for an agent, resolving it if it's a function. This method provides access to the scoring system used for evaluating agent responses and performance.

使用示例
Direct link to 使用示例

🌐 Usage example

await agent.listScorers();

参数
Direct link to 参数

🌐 Parameters

options?:

{ requestContext?: RequestContext }
= {}
Optional configuration object containing request context.

返回
Direct link to 返回

🌐 Returns

scorers:

MastraScorers | Promise<MastraScorers>
The scoring configuration configured for the agent, either as a direct object or a promise that resolves to the scorers.

扩展使用示例
Direct link to 扩展使用示例

🌐 Extended usage example

await agent.listScorers({
requestContext: new RequestContext(),
});

选项参数
Direct link to 选项参数

🌐 Options parameters

requestContext?:

RequestContext
= new RequestContext()
Request Context for dependency injection and contextual information.

🌐 Related