The
evaluators client methods are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.template (LLM-as-judge) or a code (managed built-in or user-supplied Python) configuration. The Get, Update, Delete, ListVersions, and CreateVersion methods accept either an evaluator name or an ID — when a name is passed, the parent Space (name or ID) is also required so the SDK can resolve the name to a unique ID. GetVersion takes a strict version ID. Set exactly one of VersionConfig.Template or VersionConfig.Code on Create and CreateVersion; within Code, set exactly one of Managed or Custom. Conflicting configurations return evaluators.ErrConflictingVersionConfig or evaluators.ErrConflictingCodeConfig without contacting the server.
List Evaluators
List returns a paginated list of evaluators. Defaults to a page size of 50. Space, when non-empty, filters by space (substring match on space name, or exact match if a base64 resource ID is passed).
Signature:
Get an Evaluator
Get returns a single evaluator (with one of its versions), resolving by name or ID. When VersionID is set, the response carries that specific version; otherwise the latest version is returned.
Signature:
Create an Evaluator
Create creates a new evaluator together with its initial version, resolving the parent space by name or ID. The evaluator’s type is derived from Version — set Version.Template for a template (LLM-based) evaluator or Version.Code for a code evaluator (with exactly one of Code.Managed or Code.Custom).
Signature:
Update an Evaluator
Update patches an existing evaluator’s metadata, resolving the target by name or ID, and returns the updated evaluator. Name and Description are pointers — nil preserves the existing value. Returns evaluators.ErrNoUpdateFields without contacting the server when no patch field is set.
Signature:
Delete an Evaluator
Delete removes an evaluator, resolving by name or ID. It returns only an error.
Signature:
List Versions
ListVersions returns a paginated list of versions for an evaluator, resolving the evaluator by name or ID. Defaults to a page size of 50.
Signature:
Create a Version
CreateVersion appends a new version to an existing evaluator, resolving the evaluator by name or ID. The new version’s kind (set via Version.Template or Version.Code) must match the parent evaluator’s type.
Signature:
Get a Version
GetVersion returns a single evaluator version by its ID. Version IDs are strict IDs — no name resolution is performed. The returned EvaluatorVersion is a discriminated union — call v.AsEvaluatorVersionTemplate() or v.AsEvaluatorVersionCode() to extract the typed variant after checking the discriminator.
Signature: