Agent.listScorers()
.listScorers() 方法检索为 Agent 配置的评分配置;如果配置是函数,则会先解析该函数。该方法提供对评分系统的访问,用于评估 Agent 的响应和性能。
使用示例使用示例的直接链接
await agent.listScorers()
参数参数的直接链接
options?:
{ requestContext?: RequestContext }
= {}
包含 request context 的可选配置对象。
{ requestContext?: RequestContext }
requestContext?:
RequestContext
用于依赖注入和上下文信息的 Request Context。
返回值返回值的直接链接
scorers:
MastraScorers | Promise<MastraScorers>
为 Agent 配置的评分配置,可以是直接提供的对象,也可以是解析为 scorers 的 Promise。
扩展使用示例扩展使用示例的直接链接
await agent.listScorers({
requestContext: new RequestContext(),
})