listScorers()
listScorers() メソッドは、Mastra インスタンスに登録されているすべての Scorer を返します。Scorer は AI の出力を評価するために使用され、Agent の生成時や Workflow の実行時にデフォルトの Scorer を上書きできます。
使用例使用例への直接リンク
import { mastra } from './mastra'
// Get all registered scorers
const allScorers = mastra.listScorers()
// Access a specific scorer
const myScorer = allScorers.relevancyScorer
パラメーターパラメーターへの直接リンク
このメソッドはパラメーターを受け取りません。
戻り値戻り値への直接リンク
scorers:
Record<string, MastraScorer> | undefined
登録済みのすべての Scorer を含むオブジェクト。キーは Scorer 名、値は MastraScorer インスタンスです。Scorer が登録されていない場合は undefined を返します。
関連項目関連項目への直接リンク
- getScorer(): キーで特定の Scorer を取得
- getScorerById(): id プロパティで Scorer を取得
- Scorer の概要: Scorer の作成方法と使用方法