The
evaluators client methods are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.template (LLM-as-judge), a code (managed built-in or user-supplied Python), or a remote (customer-hosted HTTP endpoint backed by an EVALUATOR integration) configuration. The Get, Update, Delete, ListVersions, DeleteVersions, 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, VersionConfig.Code, or VersionConfig.Remote 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. Typed convenience methods (CreateTemplateEvaluator, CreateCodeEvaluator, CreateRemoteEvaluator and the matching CreateTemplateVersion, CreateCodeVersion, CreateRemoteVersion) create one evaluator kind directly without assembling a VersionConfig.
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:
Delete Versions
DeleteVersions deletes a batch of versions (1–100 per request) belonging to an evaluator, resolving the evaluator by name or ID. The delete is partial-tolerant: version IDs that exist and belong to the evaluator are deleted, and requested IDs that were not deleted are returned in NotDeletedVersionIds. Completed reports that the request finished — it does not mean every requested ID was found and deleted.
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, Version.Code, or Version.Remote) 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:
Create a Template Evaluator
CreateTemplateEvaluator creates a TEMPLATE (LLM-as-judge) evaluator together with its initial version in one call. It is equivalent to Create with Version.Template set, without assembling a VersionConfig.
Signature:
Create a Code Evaluator
CreateCodeEvaluator creates a CODE evaluator together with its initial version in one call. It is equivalent to Create with Version.Code set. Set exactly one of Config.Managed (a built-in managed evaluator) or Config.Custom (user-supplied Python); a conflicting configuration returns evaluators.ErrConflictingCodeConfig without contacting the server.
Signature:
Create a Remote Evaluator
CreateRemoteEvaluator creates a REMOTE evaluator backed by an existing EVALUATOR integration, together with its initial version. It is equivalent to Create with Version.Remote set. This method requires the enableRemoteEvalTasks feature flag on the account.
Signature:
Create a Template Version
CreateTemplateVersion appends a new TEMPLATE version to an existing evaluator, resolving the evaluator by name or ID. It is equivalent to CreateVersion with Version.Template set; the parent evaluator must be a template evaluator.
Signature:
Create a Code Version
CreateCodeVersion appends a new CODE version to an existing evaluator, resolving the evaluator by name or ID. It is equivalent to CreateVersion with Version.Code set. Set exactly one of Config.Managed or Config.Custom; a conflicting configuration returns evaluators.ErrConflictingCodeConfig without contacting the server.
Signature:
Create a Remote Version
CreateRemoteVersion appends a new REMOTE version to an existing evaluator, resolving the evaluator by name or ID, optionally switching to a different EVALUATOR integration. It is equivalent to CreateVersion with Version.Remote set.
Signature: