Skip to main content

Function: validateCodeScorer()

Defined in: src/utils/scorers.ts Validates code scorer content and waits for the result.

Parameters

codeContent

string The Python code content to validate. Must include a function named scorer_fn with a return type annotation.

scoreableNodeTypes

( | "agent" | "llm" | "retriever" | "tool" | "workflow" | "control" | "trace" | "session")[] The node types that this scorer can score.

timeoutMs?

number (Optional) Maximum time to wait for validation in milliseconds.

pollIntervalMs?

number (Optional) Interval between polling attempts in milliseconds.

requiredScorers?

string[]

Returns

Promise<ValidateRegisteredScorerResult> A promise that resolves to the validation result.